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

Unified Diff: chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.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, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
diff --git a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
index 54f38f815206a7ceebffb15035a08d30314a4b6c..9d01f7500060b4fc29ec25d46bf8bcf84d7f431b 100644
--- a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
+++ b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h
@@ -7,12 +7,13 @@
#include "base/memory/weak_ptr.h"
#include "base/scoped_observer.h"
-#include "chrome/browser/ui/views/toolbar/browser_actions_container_observer.h"
+#include "chrome/browser/ui/toolbar/toolbar_actions_bar_observer.h"
#include "ui/views/controls/scroll_view.h"
class AppMenu;
class Browser;
class BrowserActionsContainer;
+class ToolbarActionsBar;
// ExtensionToolbarMenuView is the view containing the extension actions that
// overflowed from the BrowserActionsContainer, and is contained in and owned by
@@ -20,7 +21,7 @@ class BrowserActionsContainer;
// In the event that the app menu was opened for an Extension Action drag-and-
// drop, this will also close the menu upon completion.
class ExtensionToolbarMenuView : public views::ScrollView,
- public BrowserActionsContainerObserver {
+ public ToolbarActionsBarObserver {
public:
ExtensionToolbarMenuView(Browser* browser, AppMenu* app_menu);
~ExtensionToolbarMenuView() override;
@@ -44,14 +45,17 @@ class ExtensionToolbarMenuView : public views::ScrollView,
static void set_close_menu_delay_for_testing(int delay);
private:
- // BrowserActionsContainerObserver:
- void OnBrowserActionsContainerDestroyed(
- BrowserActionsContainer* browser_actions_container) override;
- void OnBrowserActionDragDone() override;
+ // ToolbarActionsBarObserver:
+ void OnToolbarActionsBarDestroyed() override;
+ void OnToolbarActionDragDone() override;
+ void OnToolbarActionsBarDidStartResize() override;
// Closes the |app_menu_|.
void CloseAppMenu();
+ // Resizes and lays out the view.
+ void Redraw();
+
// Returns the padding before the BrowserActionsContainer in the menu.
int start_padding() const;
@@ -67,8 +71,8 @@ class ExtensionToolbarMenuView : public views::ScrollView,
// The maximum allowed height for the view.
int max_height_;
- ScopedObserver<BrowserActionsContainer, BrowserActionsContainerObserver>
- browser_actions_container_observer_;
+ ScopedObserver<ToolbarActionsBar, ToolbarActionsBarObserver>
+ toolbar_actions_bar_observer_;
base::WeakPtrFactory<ExtensionToolbarMenuView> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698