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

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

Issue 1419603004: [Extensions Toolbar] Fix action pop out bug and views animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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/ui/toolbar/toolbar_actions_bar.h" 10 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
11 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_delegate.h" 11 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_delegate.h"
12 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views .h" 12 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views .h"
13 #include "chrome/browser/ui/views/toolbar/chevron_menu_button.h" 13 #include "chrome/browser/ui/views/toolbar/chevron_menu_button.h"
14 #include "chrome/browser/ui/views/toolbar/toolbar_action_view.h" 14 #include "chrome/browser/ui/views/toolbar/toolbar_action_view.h"
15 #include "ui/gfx/animation/animation_delegate.h" 15 #include "ui/gfx/animation/animation_delegate.h"
16 #include "ui/gfx/animation/slide_animation.h" 16 #include "ui/gfx/animation/slide_animation.h"
17 #include "ui/gfx/animation/tween.h" 17 #include "ui/gfx/animation/tween.h"
18 #include "ui/views/controls/resize_area_delegate.h" 18 #include "ui/views/controls/resize_area_delegate.h"
19 #include "ui/views/drag_controller.h" 19 #include "ui/views/drag_controller.h"
20 #include "ui/views/view.h" 20 #include "ui/views/view.h"
21 #include "ui/views/widget/widget_observer.h" 21 #include "ui/views/widget/widget_observer.h"
22 22
23 class BrowserActionsContainerObserver;
24 class ExtensionPopup; 23 class ExtensionPopup;
25 24
26 namespace extensions { 25 namespace extensions {
27 class ActiveTabPermissionGranter; 26 class ActiveTabPermissionGranter;
28 class Command; 27 class Command;
29 class Extension; 28 class Extension;
30 } 29 }
31 30
32 namespace views { 31 namespace views {
33 class BubbleDelegateView; 32 class BubbleDelegateView;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 187
189 // Executes |command| registered by |extension|. 188 // Executes |command| registered by |extension|.
190 void ExecuteExtensionCommand(const extensions::Extension* extension, 189 void ExecuteExtensionCommand(const extensions::Extension* extension,
191 const extensions::Command& command); 190 const extensions::Command& command);
192 191
193 // Returns the preferred width given the limit of |max_width|. (Unlike most 192 // Returns the preferred width given the limit of |max_width|. (Unlike most
194 // views, since we don't want to show part of an icon or a large space after 193 // views, since we don't want to show part of an icon or a large space after
195 // the omnibox, this is probably *not* |max_width|). 194 // the omnibox, this is probably *not* |max_width|).
196 int GetWidthForMaxWidth(int max_width) const; 195 int GetWidthForMaxWidth(int max_width) const;
197 196
198 // Add or remove an observer.
199 void AddObserver(BrowserActionsContainerObserver* observer);
200 void RemoveObserver(BrowserActionsContainerObserver* observer);
201
202 // Overridden from views::View: 197 // Overridden from views::View:
203 gfx::Size GetPreferredSize() const override; 198 gfx::Size GetPreferredSize() const override;
204 int GetHeightForWidth(int width) const override; 199 int GetHeightForWidth(int width) const override;
205 gfx::Size GetMinimumSize() const override; 200 gfx::Size GetMinimumSize() const override;
206 void Layout() override; 201 void Layout() override;
207 void OnMouseEntered(const ui::MouseEvent& event) override; 202 void OnMouseEntered(const ui::MouseEvent& event) override;
208 bool GetDropFormats( 203 bool GetDropFormats(
209 int* formats, 204 int* formats,
210 std::set<ui::Clipboard::FormatType>* format_types) override; 205 std::set<ui::Clipboard::FormatType>* format_types) override;
211 bool AreDropTypesRequired() override; 206 bool AreDropTypesRequired() override;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // The DropPosition for the current drag-and-drop operation, or NULL if there 343 // The DropPosition for the current drag-and-drop operation, or NULL if there
349 // is none. 344 // is none.
350 scoped_ptr<DropPosition> drop_position_; 345 scoped_ptr<DropPosition> drop_position_;
351 346
352 // The class that registers for keyboard shortcuts for extension commands. 347 // The class that registers for keyboard shortcuts for extension commands.
353 scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_; 348 scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_;
354 349
355 // The extension bubble that is actively showing, if any. 350 // The extension bubble that is actively showing, if any.
356 views::BubbleDelegateView* active_bubble_; 351 views::BubbleDelegateView* active_bubble_;
357 352
358 base::ObserverList<BrowserActionsContainerObserver> observers_;
359
360 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer); 353 DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainer);
361 }; 354 };
362 355
363 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_ 356 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTIONS_CONTAINER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_bar_observer.h ('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