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

Side by Side Diff: chrome/browser/ui/views/toolbar/browser_actions_container.h

Issue 411063003: Combine BrowserActionView and BrowserActionButton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 6 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_
7 7
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "chrome/browser/extensions/extension_keybinding_registry.h" 9 #include "chrome/browser/extensions/extension_keybinding_registry.h"
10 #include "chrome/browser/extensions/extension_toolbar_model.h" 10 #include "chrome/browser/extensions/extension_toolbar_model.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // Overridden from BrowserActionOverflowMenuController::Observer: 228 // Overridden from BrowserActionOverflowMenuController::Observer:
229 virtual void NotifyMenuDeleted( 229 virtual void NotifyMenuDeleted(
230 BrowserActionOverflowMenuController* controller) OVERRIDE; 230 BrowserActionOverflowMenuController* controller) OVERRIDE;
231 231
232 // Overridden from BrowserActionView::Delegate: 232 // Overridden from BrowserActionView::Delegate:
233 virtual content::WebContents* GetCurrentWebContents() OVERRIDE; 233 virtual content::WebContents* GetCurrentWebContents() OVERRIDE;
234 virtual void OnBrowserActionVisibilityChanged() OVERRIDE; 234 virtual void OnBrowserActionVisibilityChanged() OVERRIDE;
235 virtual bool ShownInsideMenu() const OVERRIDE; 235 virtual bool ShownInsideMenu() const OVERRIDE;
236 virtual void OnBrowserActionViewDragDone() OVERRIDE; 236 virtual void OnBrowserActionViewDragDone() OVERRIDE;
237 virtual views::View* GetOverflowReferenceView() OVERRIDE; 237 virtual views::View* GetOverflowReferenceView() OVERRIDE;
238 virtual void SetPopupOwner(BrowserActionButton* popup_owner) OVERRIDE; 238 virtual void SetPopupOwner(BrowserActionView* popup_owner) OVERRIDE;
239 virtual void HideActivePopup() OVERRIDE; 239 virtual void HideActivePopup() OVERRIDE;
240 240
241 // Overridden from extension::ExtensionKeybindingRegistry::Delegate: 241 // Overridden from extension::ExtensionKeybindingRegistry::Delegate:
242 virtual extensions::ActiveTabPermissionGranter* 242 virtual extensions::ActiveTabPermissionGranter*
243 GetActiveTabPermissionGranter() OVERRIDE; 243 GetActiveTabPermissionGranter() OVERRIDE;
244 244
245 // Moves a browser action with |id| to |new_index|. 245 // Moves a browser action with |id| to |new_index|.
246 void MoveBrowserAction(const std::string& extension_id, size_t new_index); 246 void MoveBrowserAction(const std::string& extension_id, size_t new_index);
247 247
248 // Shows the popup for |extension| if possible. Returns true if a new popup 248 // Shows the popup for |extension| if possible. Returns true if a new popup
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 Browser* browser_; 363 Browser* browser_;
364 364
365 // The view that owns us. 365 // The view that owns us.
366 views::View* owner_view_; 366 views::View* owner_view_;
367 367
368 // The main container we are serving as overflow for, or NULL if this 368 // The main container we are serving as overflow for, or NULL if this
369 // class is the the main container. See class comments for details on 369 // class is the the main container. See class comments for details on
370 // the difference between main and overflow. 370 // the difference between main and overflow.
371 BrowserActionsContainer* main_container_; 371 BrowserActionsContainer* main_container_;
372 372
373 // The button that triggered the current popup (just a reference to a button 373 // The view that triggered the current popup (just a reference to a view
374 // from browser_action_views_). 374 // from browser_action_views_).
375 BrowserActionButton* popup_owner_; 375 BrowserActionView* popup_owner_;
376 376
377 // The model that tracks the order of the toolbar icons. 377 // The model that tracks the order of the toolbar icons.
378 extensions::ExtensionToolbarModel* model_; 378 extensions::ExtensionToolbarModel* model_;
379 379
380 // The current width of the container. 380 // The current width of the container.
381 int container_width_; 381 int container_width_;
382 382
383 // The resize area for the container. 383 // The resize area for the container.
384 views::ResizeArea* resize_area_; 384 views::ResizeArea* resize_area_;
385 385
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 // Handles delayed showing of the overflow menu when hovering. 421 // Handles delayed showing of the overflow menu when hovering.
422 base::WeakPtrFactory<BrowserActionsContainer> show_menu_task_factory_; 422 base::WeakPtrFactory<BrowserActionsContainer> show_menu_task_factory_;
423 423
424 ObserverList<BrowserActionsContainerObserver> observers_; 424 ObserverList<BrowserActionsContainerObserver> observers_;
425 425
426 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); 426 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer);
427 }; 427 };
428 428
429 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ 429 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_action_view.cc ('k') | chrome/browser/ui/views/toolbar/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698