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

Side by Side Diff: chrome/browser/extensions/browser_action_test_util.h

Issue 1643963003: [Extensions UI Mac] Fix race condition in showing the icon surfacing bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/browser_action_test_util_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Tests that the button at the given |index| is displaying that it wants 88 // Tests that the button at the given |index| is displaying that it wants
89 // to run. 89 // to run.
90 bool ActionButtonWantsToRun(size_t index); 90 bool ActionButtonWantsToRun(size_t index);
91 91
92 // Sets the current width of the browser actions container without resizing 92 // Sets the current width of the browser actions container without resizing
93 // the underlying controller. This is to simulate e.g. when the browser window 93 // the underlying controller. This is to simulate e.g. when the browser window
94 // is too small for the preferred width. 94 // is too small for the preferred width.
95 void SetWidth(int width); 95 void SetWidth(int width);
96 96
97 // Returns true if the container is currently highlighting in preparation for
98 // showing the icon surfacing bubble.
99 bool IsHighlightingForSurfacingBubble();
100
97 // Returns the ToolbarActionsBar. 101 // Returns the ToolbarActionsBar.
98 ToolbarActionsBar* GetToolbarActionsBar(); 102 ToolbarActionsBar* GetToolbarActionsBar();
99 103
100 // Creates and returns a BrowserActionTestUtil with an "overflow" container, 104 // Creates and returns a BrowserActionTestUtil with an "overflow" container,
101 // with this object's container as the main bar. 105 // with this object's container as the main bar.
102 scoped_ptr<BrowserActionTestUtil> CreateOverflowBar(); 106 scoped_ptr<BrowserActionTestUtil> CreateOverflowBar();
103 107
104 // Returns the minimum allowed size of an extension popup. 108 // Returns the minimum allowed size of an extension popup.
105 static gfx::Size GetMinPopupSize(); 109 static gfx::Size GetMinPopupSize();
106 110
107 // Returns the maximum allowed size of an extension popup. 111 // Returns the maximum allowed size of an extension popup.
108 static gfx::Size GetMaxPopupSize(); 112 static gfx::Size GetMaxPopupSize();
109 113
110 private: 114 private:
111 // A private constructor to create an overflow version. 115 // A private constructor to create an overflow version.
112 BrowserActionTestUtil(Browser* browser, BrowserActionTestUtil* main_bar); 116 BrowserActionTestUtil(Browser* browser, BrowserActionTestUtil* main_bar);
113 117
114 Browser* browser_; // weak 118 Browser* browser_; // weak
115 119
116 // Our test helper, which constructs and owns the views if we don't have a 120 // Our test helper, which constructs and owns the views if we don't have a
117 // real browser window, or if this is an overflow version. 121 // real browser window, or if this is an overflow version.
118 scoped_ptr<TestToolbarActionsBarHelper> test_helper_; 122 scoped_ptr<TestToolbarActionsBarHelper> test_helper_;
119 123
120 DISALLOW_COPY_AND_ASSIGN(BrowserActionTestUtil); 124 DISALLOW_COPY_AND_ASSIGN(BrowserActionTestUtil);
121 }; 125 };
122 126
123 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ 127 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/browser_action_test_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698