Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_tab.h

Issue 335483003: Revert "Re-styled the App Info Dialog according to UI feedback" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_tab.h
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_tab.h
similarity index 57%
rename from chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h
rename to chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_tab.h
index 3db631d80665a2e1136bd73bb85a873a9b44a371..1b1d9965603da51ef44f41e8aef064c4a0c2baf9 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_tab.h
@@ -2,55 +2,60 @@
// 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_PANEL_H_
-#define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_SUMMARY_PANEL_H_
+#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 "base/callback_forward.h"
-#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.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 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;
}
-// The summary panel of the app info dialog, which provides basic information
-// and controls related to the app.
-class AppInfoSummaryPanel : public AppInfoPanel,
- public views::ComboboxListener,
- public views::ButtonListener {
+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 {
public:
- AppInfoSummaryPanel(gfx::NativeWindow parent_window,
- Profile* profile,
- const extensions::Extension* app,
- const base::Closure& close_callback);
+ AppInfoSummaryTab(gfx::NativeWindow parent_window,
+ Profile* profile,
+ const extensions::Extension* app,
+ const base::Closure& close_callback);
- virtual ~AppInfoSummaryPanel();
+ virtual ~AppInfoSummaryTab();
private:
// Internal initialisation methods.
void CreateDescriptionControl();
void CreateLaunchOptionControl();
- void CreateShortcutsButton();
+ void CreateButtons();
- void LayoutDescriptionControl();
- void LayoutShortcutsButton();
+ void LayoutButtons();
// Overridden from views::ComboboxListener:
virtual void OnPerformAction(views::Combobox* combobox) OVERRIDE;
@@ -59,6 +64,10 @@ class AppInfoSummaryPanel : public AppInfoPanel,
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;
@@ -67,21 +76,29 @@ class AppInfoSummaryPanel : public AppInfoPanel,
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;
- // UI elements on the dialog.
- views::Label* description_heading_;
- views::Label* description_label_;
+ bool HasImportedModules();
+ // UI elements on the dialog.
+ views::View* app_summary_panel_;
+ views::Label* app_description_label_;
views::LabelButton* create_shortcuts_button_;
+ scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_;
+ views::LabelButton* uninstall_button_;
+
scoped_ptr<LaunchOptionsComboboxModel> launch_options_combobox_model_;
views::Combobox* launch_options_combobox_;
- DISALLOW_COPY_AND_ASSIGN(AppInfoSummaryPanel);
+ DISALLOW_COPY_AND_ASSIGN(AppInfoSummaryTab);
};
-#endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_SUMMARY_PANEL_H_
+#endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_SUMMARY_TAB_H_

Powered by Google App Engine
This is Rietveld 408576698