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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view.h

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: fix cros build Created 3 years, 9 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_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/extensions/extension_install_prompt.h" 9 #include "chrome/browser/extensions/extension_install_prompt.h"
10 #include "ui/gfx/animation/animation_delegate.h" 10 #include "ui/gfx/animation/animation_delegate.h"
11 #include "ui/gfx/animation/slide_animation.h" 11 #include "ui/gfx/animation/slide_animation.h"
12 #include "ui/views/controls/button/button.h" 12 #include "ui/views/controls/button/image_button.h"
13 #include "ui/views/controls/link_listener.h" 13 #include "ui/views/controls/link_listener.h"
14 #include "ui/views/view.h" 14 #include "ui/views/view.h"
15 #include "ui/views/window/dialog_delegate.h" 15 #include "ui/views/window/dialog_delegate.h"
16 16
17 typedef std::vector<base::string16> PermissionDetails; 17 typedef std::vector<base::string16> PermissionDetails;
18 class Profile; 18 class Profile;
19 19
20 namespace content { 20 namespace content {
21 class PageNavigator; 21 class PageNavigator;
22 } 22 }
23 23
24 namespace extensions { 24 namespace extensions {
25 class ExperienceSamplingEvent; 25 class ExperienceSamplingEvent;
26 } 26 }
27 27
28 namespace ui { 28 namespace ui {
29 class ResourceBundle; 29 class ResourceBundle;
30 } 30 }
31 31
32 namespace views { 32 namespace views {
33 class GridLayout; 33 class GridLayout;
34 class ImageButton;
35 class Link; 34 class Link;
36 } 35 }
37 36
38 // Implements the extension installation dialog for TOOLKIT_VIEWS. 37 // Implements the extension installation dialog for TOOLKIT_VIEWS.
39 class ExtensionInstallDialogView : public views::DialogDelegateView, 38 class ExtensionInstallDialogView : public views::DialogDelegateView,
40 public views::LinkListener { 39 public views::LinkListener {
41 public: 40 public:
42 ExtensionInstallDialogView( 41 ExtensionInstallDialogView(
43 Profile* profile, 42 Profile* profile,
44 content::PageNavigator* navigator, 43 content::PageNavigator* navigator,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // layout. 118 // layout.
120 class BulletedView : public views::View { 119 class BulletedView : public views::View {
121 public: 120 public:
122 explicit BulletedView(views::View* view); 121 explicit BulletedView(views::View* view);
123 private: 122 private:
124 DISALLOW_COPY_AND_ASSIGN(BulletedView); 123 DISALLOW_COPY_AND_ASSIGN(BulletedView);
125 }; 124 };
126 125
127 // A view to display text with an expandable details section. 126 // A view to display text with an expandable details section.
128 class ExpandableContainerView : public views::View, 127 class ExpandableContainerView : public views::View,
129 public views::ButtonListener, 128 public views::ImageButtonDelegate,
130 public views::LinkListener, 129 public views::LinkListener,
131 public gfx::AnimationDelegate { 130 public gfx::AnimationDelegate {
132 public: 131 public:
133 ExpandableContainerView(const PermissionDetails& details, 132 ExpandableContainerView(const PermissionDetails& details,
134 int horizontal_space, 133 int horizontal_space,
135 bool parent_bulleted); 134 bool parent_bulleted);
136 ~ExpandableContainerView() override; 135 ~ExpandableContainerView() override;
137 136
138 // views::View: 137 // views::View:
139 void ChildPreferredSizeChanged(views::View* child) override; 138 void ChildPreferredSizeChanged(views::View* child) override;
140 139
141 // views::ButtonListener: 140 // views::ImageButtonDelegate:
142 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 141 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
143 142
144 // views::LinkListener: 143 // views::LinkListener:
145 void LinkClicked(views::Link* source, int event_flags) override; 144 void LinkClicked(views::Link* source, int event_flags) override;
146 145
147 // gfx::AnimationDelegate: 146 // gfx::AnimationDelegate:
148 void AnimationProgressed(const gfx::Animation* animation) override; 147 void AnimationProgressed(const gfx::Animation* animation) override;
149 void AnimationEnded(const gfx::Animation* animation) override; 148 void AnimationEnded(const gfx::Animation* animation) override;
150 149
151 private: 150 private:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // on whether the details section is expanded). 188 // on whether the details section is expanded).
190 views::ImageButton* arrow_toggle_; 189 views::ImageButton* arrow_toggle_;
191 190
192 // Whether the details section is expanded. 191 // Whether the details section is expanded.
193 bool expanded_; 192 bool expanded_;
194 193
195 DISALLOW_COPY_AND_ASSIGN(ExpandableContainerView); 194 DISALLOW_COPY_AND_ASSIGN(ExpandableContainerView);
196 }; 195 };
197 196
198 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ 197 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698