#ifndef CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_SUMMARY_TAB_H_
#define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_SUMMARY_TAB_H_
#include "chrome/browser/extensions/extension_uninstall_dialog.h"
#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_tab.h"
#include "chrome/common/extensions/extension_constants.h"
#include "ui/base/models/combobox_model.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/combobox/combobox_listener.h"
#include "ui/views/controls/link_listener.h"
class Profile;
namespace extensions {
class Extension;
}
namespace gfx {
class Image;
}
namespace ui {
class Event;
}
namespace views {
class Combobox;
class ImageView;
class LabelButton;
}
class LaunchOptionsComboboxModel;
class AppInfoSummaryTab : public AppInfoTab,
public views::LinkListener,
public views::ComboboxListener,
public views::ButtonListener,
public ExtensionUninstallDialog::Delegate,
public base::SupportsWeakPtr<AppInfoSummaryTab> {
public:
AppInfoSummaryTab(gfx::NativeWindow parent_window,
Profile* profile,
const extensions::Extension* app,
const base::Closure& close_callback);
virtual ~AppInfoSummaryTab();
private:
virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
virtual void OnPerformAction(views::Combobox* combobox) OVERRIDE;
virtual void ButtonPressed(views::Button* sender,
const ui::Event& event) OVERRIDE;
virtual void ExtensionUninstallAccepted() OVERRIDE;
virtual void ExtensionUninstallCanceled() OVERRIDE;
void LoadAppImageAsync();
void OnAppImageLoaded(const gfx::Image& image);
extensions::LaunchType GetLaunchType() const;
void SetLaunchType(extensions::LaunchType) const;
bool CanSetLaunchType() const;
void ShowAppInWebStore() const;
bool CanShowAppInWebStore() const;
void UninstallApp();
bool CanUninstallApp() const;
views::ImageView* app_icon_;
views::Link* view_in_store_link_;
scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_;
views::LabelButton* uninstall_button_;
scoped_ptr<LaunchOptionsComboboxModel> launch_options_combobox_model_;
views::Combobox* launch_options_combobox_;
base::WeakPtrFactory<AppInfoSummaryTab> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(AppInfoSummaryTab);
};
#endif