| Index: chrome/browser/ui/views/apps/app_info_dialog/app_info_details_panel.h
|
| diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_tab.h b/chrome/browser/ui/views/apps/app_info_dialog/app_info_details_panel.h
|
| similarity index 55%
|
| rename from chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_tab.h
|
| rename to chrome/browser/ui/views/apps/app_info_dialog/app_info_details_panel.h
|
| index 1b1d9965603da51ef44f41e8aef064c4a0c2baf9..4018fcf4ba773d526423539531ef7e32c44bb112 100644
|
| --- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_tab.h
|
| +++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_details_panel.h
|
| @@ -2,60 +2,57 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#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_
|
| +#ifndef CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_DETAILS_PANEL_H_
|
| +#define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_DETAILS_PANEL_H_
|
|
|
| -#include "chrome/browser/extensions/extension_uninstall_dialog.h"
|
| -#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_tab.h"
|
| +#include <vector>
|
| +
|
| +#include "base/memory/scoped_ptr.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"
|
| +#include "ui/views/view.h"
|
|
|
| +class LaunchOptionsComboboxModel;
|
| class Profile;
|
|
|
| namespace extensions {
|
| class Extension;
|
| }
|
| -namespace gfx {
|
| -class Image;
|
| -}
|
| namespace ui {
|
| class Event;
|
| }
|
| namespace views {
|
| class Combobox;
|
| -class ImageView;
|
| class Label;
|
| class LabelButton;
|
| }
|
|
|
| -class LaunchOptionsComboboxModel;
|
| -
|
| // The Summary tab of the app info dialog, which provides basic information and
|
| // controls related to the app.
|
| -class AppInfoSummaryTab
|
| - : public AppInfoTab,
|
| - public views::ComboboxListener,
|
| - public views::ButtonListener,
|
| - public extensions::ExtensionUninstallDialog::Delegate {
|
| +class AppInfoDetailsPanel : public views::View,
|
| + public views::ComboboxListener,
|
| + public views::ButtonListener {
|
| public:
|
| - AppInfoSummaryTab(gfx::NativeWindow parent_window,
|
| - Profile* profile,
|
| - const extensions::Extension* app,
|
| - const base::Closure& close_callback);
|
| + AppInfoDetailsPanel(gfx::NativeWindow parent_window,
|
| + Profile* profile,
|
| + const extensions::Extension* app);
|
|
|
| - virtual ~AppInfoSummaryTab();
|
| + virtual ~AppInfoDetailsPanel();
|
|
|
| private:
|
| // Internal initialisation methods.
|
| void CreateDescriptionControl();
|
| + void CreateActivePermissionsControl();
|
| + void CreateRetainedFilesControl();
|
| void CreateLaunchOptionControl();
|
| - void CreateButtons();
|
| + void CreateShortcutsButton();
|
|
|
| - void LayoutButtons();
|
| + void LayoutDescriptionControl();
|
| + void LayoutActivePermissionsControl();
|
| + void LayoutRetainedFilesControl();
|
| + void LayoutShortcutsButton();
|
|
|
| // Overridden from views::ComboboxListener:
|
| virtual void OnPerformAction(views::Combobox* combobox) OVERRIDE;
|
| @@ -64,10 +61,6 @@ class AppInfoSummaryTab
|
| virtual void ButtonPressed(views::Button* sender,
|
| const ui::Event& event) OVERRIDE;
|
|
|
| - // Overridden from ExtensionUninstallDialog::Delegate.
|
| - virtual void ExtensionUninstallAccepted() OVERRIDE;
|
| - virtual void ExtensionUninstallCanceled() OVERRIDE;
|
| -
|
| // Returns the launch type of the app (e.g. pinned tab, fullscreen, etc).
|
| extensions::LaunchType GetLaunchType() const;
|
|
|
| @@ -76,29 +69,36 @@ class AppInfoSummaryTab
|
| void SetLaunchType(extensions::LaunchType) const;
|
| bool CanSetLaunchType() const;
|
|
|
| - // Uninstall the app. Must only be called if CanUninstallApp() returns true.
|
| - void UninstallApp();
|
| - bool CanUninstallApp() const;
|
| -
|
| // Create Shortcuts for the app. Must only be called if CanCreateShortcuts()
|
| // returns true.
|
| void CreateShortcuts();
|
| bool CanCreateShortcuts() const;
|
|
|
| - bool HasImportedModules();
|
| + const std::vector<base::string16> GetActivePermissionMessages() const;
|
| + const std::vector<base::string16> GetRetainedFilePaths() const;
|
| + void RevokeFilePermissions();
|
| +
|
| + gfx::NativeWindow parent_window_;
|
| + Profile* profile_;
|
| + const extensions::Extension* app_;
|
|
|
| // UI elements on the dialog.
|
| - views::View* app_summary_panel_;
|
| - views::Label* app_description_label_;
|
| - views::LabelButton* create_shortcuts_button_;
|
| + views::Label* description_heading_;
|
| + views::Label* description_label_;
|
|
|
| - scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_;
|
| - views::LabelButton* uninstall_button_;
|
| + views::Label* active_permissions_heading_;
|
| + views::View* active_permissions_list_;
|
| +
|
| + views::Label* retained_files_heading_;
|
| + views::View* retained_files_list_;
|
| + views::LabelButton* revoke_file_permissions_button_;
|
| +
|
| + views::LabelButton* create_shortcuts_button_;
|
|
|
| scoped_ptr<LaunchOptionsComboboxModel> launch_options_combobox_model_;
|
| views::Combobox* launch_options_combobox_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(AppInfoSummaryTab);
|
| + DISALLOW_COPY_AND_ASSIGN(AppInfoDetailsPanel);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_SUMMARY_TAB_H_
|
| +#endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_DETAILS_PANEL_H_
|
|
|