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

Side by Side Diff: chrome/browser/ui/views/menu_test_base.h

Issue 399143004: Open the WrenchMenu on mouseover when dragging a browser action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Win/Test Fix Created 6 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_VIEWS_MENU_TEST_BASE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_
6 #define CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/test/base/view_event_test_base.h" 10 #include "chrome/test/base/view_event_test_base.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return last_command_; 53 return last_command_;
54 } 54 }
55 55
56 protected: 56 protected:
57 // Called to populate the menu. 57 // Called to populate the menu.
58 virtual void BuildMenu(views::MenuItemView* menu) = 0; 58 virtual void BuildMenu(views::MenuItemView* menu) = 0;
59 59
60 // Called once the menu is open. 60 // Called once the menu is open.
61 virtual void DoTestWithMenuOpen() = 0; 61 virtual void DoTestWithMenuOpen() = 0;
62 62
63 // Returns a bitmask of flags to use when creating the |menu_runner_|. By
64 // default, this is only views::MenuRunner::HAS_MNEMONICS.
65 virtual int GetMenuRunnerFlags();
66
63 // ViewEventTestBase implementation. 67 // ViewEventTestBase implementation.
64 virtual void SetUp() OVERRIDE; 68 virtual void SetUp() OVERRIDE;
65 virtual void TearDown() OVERRIDE; 69 virtual void TearDown() OVERRIDE;
66 virtual views::View* CreateContentsView() OVERRIDE; 70 virtual views::View* CreateContentsView() OVERRIDE;
67 virtual void DoTestOnMessageLoop() OVERRIDE; 71 virtual void DoTestOnMessageLoop() OVERRIDE;
68 virtual gfx::Size GetPreferredSize() const OVERRIDE; 72 virtual gfx::Size GetPreferredSize() const OVERRIDE;
69 73
70 // views::MenuButtonListener implementation 74 // views::MenuButtonListener implementation
71 virtual void OnMenuButtonClicked(views::View* source, 75 virtual void OnMenuButtonClicked(views::View* source,
72 const gfx::Point& point) OVERRIDE; 76 const gfx::Point& point) OVERRIDE;
73 77
74 // views::MenuDelegate implementation 78 // views::MenuDelegate implementation
75 virtual void ExecuteCommand(int id) OVERRIDE; 79 virtual void ExecuteCommand(int id) OVERRIDE;
76 80
77 private: 81 private:
78 views::MenuButton* button_; 82 views::MenuButton* button_;
79 views::MenuItemView* menu_; 83 views::MenuItemView* menu_;
80 scoped_ptr<views::MenuRunner> menu_runner_; 84 scoped_ptr<views::MenuRunner> menu_runner_;
81 85
82 // The command id of the last pressed menu item since the menu was opened. 86 // The command id of the last pressed menu item since the menu was opened.
83 int last_command_; 87 int last_command_;
84 88
85 DISALLOW_COPY_AND_ASSIGN(MenuTestBase); 89 DISALLOW_COPY_AND_ASSIGN(MenuTestBase);
86 }; 90 };
87 91
88 #endif // CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_ 92 #endif // CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698