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

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

Issue 335523002: Re-styled App Info Dialog according to UI feedback 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes, and removed border either side of the horizontal rules (doesn't match mocks anyway) 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_footer_panel.h
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.h b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a2aa1793127e928722fb65cb4b14ca498bcb948
--- /dev/null
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.h
@@ -0,0 +1,71 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// 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_FOOTER_PANEL_H_
+#define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_FOOTER_PANEL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/extensions/extension_uninstall_dialog.h"
+#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.h"
+#include "ui/views/controls/button/button.h"
+
+class Profile;
+
+namespace extensions {
+class Extension;
+}
+
+namespace ui {
+class Event;
+}
+
+namespace views {
+class LabelButton;
+}
+
+// A small summary panel with buttons to control the app that is displayed at
+// the bottom of the app info dialog.
+class AppInfoFooterPanel
+ : public AppInfoPanel,
+ public views::ButtonListener,
+ public extensions::ExtensionUninstallDialog::Delegate,
+ public base::SupportsWeakPtr<AppInfoFooterPanel> {
+ public:
+ AppInfoFooterPanel(Profile* profile, const extensions::Extension* app);
+ virtual ~AppInfoFooterPanel();
+
+ private:
+ void CreateButtons();
+ void LayoutButtons();
+
+ // Overridden from views::ButtonListener:
+ virtual void ButtonPressed(views::Button* sender,
+ const ui::Event& event) OVERRIDE;
+
+ // Overridden from ExtensionUninstallDialog::Delegate:
+ virtual void ExtensionUninstallAccepted() OVERRIDE;
+ virtual void ExtensionUninstallCanceled() OVERRIDE;
+
+ // Create Shortcuts for the app. Must only be called if CanCreateShortcuts()
+ // returns true.
+ void CreateShortcuts();
+ bool CanCreateShortcuts() const;
+
+ // Uninstall the app. Must only be called if CanUninstallApp() returns true.
+ void UninstallApp();
+ bool CanUninstallApp() const;
+
+ // UI elements on the dialog. Elements are NULL if they are not displayed.
+ views::LabelButton* create_shortcuts_button_;
+ views::LabelButton* remove_button_;
+
+ scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_;
+
+ base::WeakPtrFactory<AppInfoFooterPanel> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(AppInfoFooterPanel);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_FOOTER_PANEL_H_

Powered by Google App Engine
This is Rietveld 408576698