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

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

Issue 1087713002: [Reland] [Extensions] Make extension message bubble factory platform-abstract (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finnur's Created 5 years, 8 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/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/memory/weak_ptr.h"
10 #include "base/scoped_observer.h" 11 #include "base/scoped_observer.h"
11 #include "chrome/browser/extensions/extension_toolbar_model.h" 12 #include "chrome/browser/extensions/extension_toolbar_model.h"
12 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h" 13 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h"
13 #include "ui/gfx/animation/tween.h" 14 #include "ui/gfx/animation/tween.h"
14 #include "ui/gfx/geometry/size.h" 15 #include "ui/gfx/geometry/size.h"
15 16
16 namespace extensions { 17 namespace extensions {
17 class Extension; 18 class Extension;
18 } 19 }
19 20
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 content::WebContents* GetCurrentWebContents(); 192 content::WebContents* GetCurrentWebContents();
192 193
193 // Reorders the toolbar actions to reflect the model and, optionally, to 194 // Reorders the toolbar actions to reflect the model and, optionally, to
194 // "pop out" any overflowed actions that want to run (depending on the 195 // "pop out" any overflowed actions that want to run (depending on the
195 // value of |pop_out_actions_to_run|. 196 // value of |pop_out_actions_to_run|.
196 void ReorderActions(); 197 void ReorderActions();
197 198
198 // Sets |overflowed_action_wants_to_run_| to the proper value. 199 // Sets |overflowed_action_wants_to_run_| to the proper value.
199 void SetOverflowedActionWantsToRun(); 200 void SetOverflowedActionWantsToRun();
200 201
202 // Shows an extension message bubble, if any should be shown.
203 void MaybeShowExtensionBubble();
204
201 bool in_overflow_mode() const { return main_bar_ != nullptr; } 205 bool in_overflow_mode() const { return main_bar_ != nullptr; }
202 206
203 // The delegate for this object (in a real build, this is the view). 207 // The delegate for this object (in a real build, this is the view).
204 ToolbarActionsBarDelegate* delegate_; 208 ToolbarActionsBarDelegate* delegate_;
205 209
206 // The associated browser. 210 // The associated browser.
207 Browser* browser_; 211 Browser* browser_;
208 212
209 // The observed toolbar model. 213 // The observed toolbar model.
210 extensions::ExtensionToolbarModel* model_; 214 extensions::ExtensionToolbarModel* model_;
(...skipping 29 matching lines...) Expand all
240 static bool pop_out_actions_to_run_; 244 static bool pop_out_actions_to_run_;
241 245
242 // If set to false, notifications for OnOverflowedActionWantsToRunChanged() 246 // If set to false, notifications for OnOverflowedActionWantsToRunChanged()
243 // will not be sent. Used because in unit tests there is no wrench menu to 247 // will not be sent. Used because in unit tests there is no wrench menu to
244 // alter. 248 // alter.
245 static bool send_overflowed_action_changes_; 249 static bool send_overflowed_action_changes_;
246 250
247 // True if an action in the overflow menu wants to run. 251 // True if an action in the overflow menu wants to run.
248 bool overflowed_action_wants_to_run_; 252 bool overflowed_action_wants_to_run_;
249 253
254 // True if we have checked to see if there is an extension bubble that should
255 // be displayed, and, if there is, shown that bubble.
256 bool checked_extension_bubble_;
257
258 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_;
259
250 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); 260 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar);
251 }; 261 };
252 262
253 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ 263 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/extension_message_bubble_factory.cc ('k') | chrome/browser/ui/toolbar/toolbar_actions_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698