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

Side by Side Diff: chrome/browser/ui/toolbar/toolbar_actions_bar.h

Issue 1246643004: [Extensions UI] Highlight toolbar extensions when the redesign bubble is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // The type of drag that occurred in a drag-and-drop operation. 60 // The type of drag that occurred in a drag-and-drop operation.
61 enum DragType { 61 enum DragType {
62 // The icon was dragged to the same container it started in. 62 // The icon was dragged to the same container it started in.
63 DRAG_TO_SAME, 63 DRAG_TO_SAME,
64 // The icon was dragged from the main container to the overflow. 64 // The icon was dragged from the main container to the overflow.
65 DRAG_TO_OVERFLOW, 65 DRAG_TO_OVERFLOW,
66 // The icon was dragged from the overflow container to the main. 66 // The icon was dragged from the overflow container to the main.
67 DRAG_TO_MAIN, 67 DRAG_TO_MAIN,
68 }; 68 };
69 69
70 enum HighlightType {
71 HIGHLIGHT_NONE,
72 HIGHLIGHT_INFO,
73 HIGHLIGHT_WARNING,
74 };
75
70 ToolbarActionsBar(ToolbarActionsBarDelegate* delegate, 76 ToolbarActionsBar(ToolbarActionsBarDelegate* delegate,
71 Browser* browser, 77 Browser* browser,
72 ToolbarActionsBar* main_bar); 78 ToolbarActionsBar* main_bar);
73 ~ToolbarActionsBar() override; 79 ~ToolbarActionsBar() override;
74 80
75 // Returns the width of a browser action icon, optionally including the 81 // Returns the width of a browser action icon, optionally including the
76 // following padding. 82 // following padding.
77 static int IconWidth(bool include_padding); 83 static int IconWidth(bool include_padding);
78 84
79 // Returns the height of a browser action icon. 85 // Returns the height of a browser action icon.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 const std::vector<ToolbarActionViewController*>& toolbar_actions_unordered() 164 const std::vector<ToolbarActionViewController*>& toolbar_actions_unordered()
159 const { 165 const {
160 return toolbar_actions_.get(); 166 return toolbar_actions_.get();
161 } 167 }
162 bool enabled() const { return model_ != nullptr; } 168 bool enabled() const { return model_ != nullptr; }
163 bool suppress_layout() const { return suppress_layout_; } 169 bool suppress_layout() const { return suppress_layout_; }
164 bool suppress_animation() const { 170 bool suppress_animation() const {
165 return suppress_animation_ || disable_animations_for_testing_; 171 return suppress_animation_ || disable_animations_for_testing_;
166 } 172 }
167 bool is_highlighting() const { return model_ && model_->is_highlighting(); } 173 bool is_highlighting() const { return model_ && model_->is_highlighting(); }
174 extensions::ExtensionToolbarModel::HighlightType highlight_type() const {
175 return model_ ? model_->highlight_type()
176 : extensions::ExtensionToolbarModel::HIGHLIGHT_NONE;
177 }
168 const PlatformSettings& platform_settings() const { 178 const PlatformSettings& platform_settings() const {
169 return platform_settings_; 179 return platform_settings_;
170 } 180 }
171 ToolbarActionViewController* popup_owner() { return popup_owner_; } 181 ToolbarActionViewController* popup_owner() { return popup_owner_; }
172 ToolbarActionViewController* popped_out_action() { 182 ToolbarActionViewController* popped_out_action() {
173 return popped_out_action_; 183 return popped_out_action_;
174 } 184 }
175 bool in_overflow_mode() const { return main_bar_ != nullptr; } 185 bool in_overflow_mode() const { return main_bar_ != nullptr; }
176 186
177 ToolbarActionsBarDelegate* delegate_for_test() { return delegate_; } 187 ToolbarActionsBarDelegate* delegate_for_test() { return delegate_; }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // The controller of the bubble to show once animation finishes, if any. 299 // The controller of the bubble to show once animation finishes, if any.
290 scoped_ptr<extensions::ExtensionMessageBubbleController> 300 scoped_ptr<extensions::ExtensionMessageBubbleController>
291 pending_extension_bubble_controller_; 301 pending_extension_bubble_controller_;
292 302
293 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; 303 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_;
294 304
295 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); 305 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar);
296 }; 306 };
297 307
298 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ 308 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698