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

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

Issue 1978403003: [MD] Eliminate as many SetStyle(STYLE_BUTTON) calls as possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_FOOTER_PANEL_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_FOOTER_PANEL_H_
6 #define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_FOOTER_PANEL_H_ 6 #define CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_FOOTER_PANEL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 13 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
14 #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.h" 14 #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.h"
15 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
16 #include "ui/views/controls/button/button.h" 16 #include "ui/views/controls/button/button.h"
17 17
18 class Profile; 18 class Profile;
19 19
20 namespace extensions { 20 namespace extensions {
21 class Extension; 21 class Extension;
22 } 22 }
23 23
24 namespace ui { 24 namespace ui {
25 class Event; 25 class Event;
26 } 26 }
27 27
28 namespace views {
29 class LabelButton;
30 }
31
32 // A small summary panel with buttons to control the app that is displayed at 28 // A small summary panel with buttons to control the app that is displayed at
33 // the bottom of the app info dialog. 29 // the bottom of the app info dialog.
34 class AppInfoFooterPanel 30 class AppInfoFooterPanel
35 : public AppInfoPanel, 31 : public AppInfoPanel,
36 public views::ButtonListener, 32 public views::ButtonListener,
37 public extensions::ExtensionUninstallDialog::Delegate, 33 public extensions::ExtensionUninstallDialog::Delegate,
38 public base::SupportsWeakPtr<AppInfoFooterPanel> { 34 public base::SupportsWeakPtr<AppInfoFooterPanel> {
39 public: 35 public:
40 AppInfoFooterPanel(gfx::NativeWindow parent_window, 36 AppInfoFooterPanel(gfx::NativeWindow parent_window,
41 Profile* profile, 37 Profile* profile,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool CanSetPinnedToShelf() const; 69 bool CanSetPinnedToShelf() const;
74 #endif 70 #endif
75 71
76 // Uninstall the app. Must only be called if CanUninstallApp() returns true. 72 // Uninstall the app. Must only be called if CanUninstallApp() returns true.
77 void UninstallApp(); 73 void UninstallApp();
78 bool CanUninstallApp() const; 74 bool CanUninstallApp() const;
79 75
80 gfx::NativeWindow parent_window_; 76 gfx::NativeWindow parent_window_;
81 77
82 // UI elements on the dialog. Elements are NULL if they are not displayed. 78 // UI elements on the dialog. Elements are NULL if they are not displayed.
83 views::LabelButton* create_shortcuts_button_; 79 views::View* create_shortcuts_button_;
84 views::LabelButton* pin_to_shelf_button_; 80 views::View* pin_to_shelf_button_;
85 views::LabelButton* unpin_from_shelf_button_; 81 views::View* unpin_from_shelf_button_;
86 views::LabelButton* remove_button_; 82 views::View* remove_button_;
87 83
88 std::unique_ptr<extensions::ExtensionUninstallDialog> 84 std::unique_ptr<extensions::ExtensionUninstallDialog>
89 extension_uninstall_dialog_; 85 extension_uninstall_dialog_;
90 86
91 base::WeakPtrFactory<AppInfoFooterPanel> weak_ptr_factory_; 87 base::WeakPtrFactory<AppInfoFooterPanel> weak_ptr_factory_;
92 88
93 DISALLOW_COPY_AND_ASSIGN(AppInfoFooterPanel); 89 DISALLOW_COPY_AND_ASSIGN(AppInfoFooterPanel);
94 }; 90 };
95 91
96 #endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_FOOTER_PANEL_H_ 92 #endif // CHROME_BROWSER_UI_VIEWS_APPS_APP_INFO_DIALOG_APP_INFO_FOOTER_PANEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698