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

Side by Side Diff: chrome/test/base/test_browser_window.h

Issue 10911274: Adding new window management (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TEST_BASE_TEST_BROWSER_WINDOW_H_ 5 #ifndef CHROME_TEST_BASE_TEST_BROWSER_WINDOW_H_
6 #define CHROME_TEST_BASE_TEST_BROWSER_WINDOW_H_ 6 #define CHROME_TEST_BASE_TEST_BROWSER_WINDOW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_window.h" 12 #include "chrome/browser/ui/browser_window.h"
13 #include "chrome/test/base/test_location_bar.h" 13 #include "chrome/test/base/test_location_bar.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 class Extension; 16 class Extension;
17 } 17 }
18 18
19 // An implementation of BrowserWindow used for testing. TestBrowserWindow only 19 // An implementation of BrowserWindow used for testing. TestBrowserWindow only
20 // contains a valid LocationBar, all other getters return NULL. 20 // contains a valid LocationBar, all other getters return NULL.
21 // See BrowserWithTestWindowTest for an example of using this class. 21 // See BrowserWithTestWindowTest for an example of using this class.
22 class TestBrowserWindow : public BrowserWindow { 22 class TestBrowserWindow : public BrowserWindow {
23 public: 23 public:
24 TestBrowserWindow(); 24 TestBrowserWindow();
25 virtual ~TestBrowserWindow(); 25 virtual ~TestBrowserWindow();
26 26
27 // BrowserWindow: 27 // BrowserWindow:
28 virtual void Show() OVERRIDE {} 28 virtual void Show() OVERRIDE {}
29 virtual void ShowInactive() OVERRIDE {} 29 virtual void ShowInactive() OVERRIDE {}
30 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE {} 30 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
31 virtual void Close() OVERRIDE {} 31 virtual void Close() OVERRIDE {}
32 virtual void Activate() OVERRIDE {} 32 virtual void Activate() OVERRIDE {}
33 virtual void Deactivate() OVERRIDE {} 33 virtual void Deactivate() OVERRIDE {}
34 virtual bool IsActive() const OVERRIDE; 34 virtual bool IsActive() const OVERRIDE;
35 virtual void FlashFrame(bool flash) OVERRIDE {} 35 virtual void FlashFrame(bool flash) OVERRIDE {}
36 virtual bool IsAlwaysOnTop() const OVERRIDE; 36 virtual bool IsAlwaysOnTop() const OVERRIDE;
37 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; 37 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
38 virtual BrowserWindowTesting* GetBrowserWindowTesting() OVERRIDE; 38 virtual BrowserWindowTesting* GetBrowserWindowTesting() OVERRIDE;
39 virtual StatusBubble* GetStatusBubble() OVERRIDE; 39 virtual StatusBubble* GetStatusBubble() OVERRIDE;
40 virtual void UpdateTitleBar() OVERRIDE {} 40 virtual void UpdateTitleBar() OVERRIDE {}
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 virtual void ShowAvatarBubble(content::WebContents* web_contents, 139 virtual void ShowAvatarBubble(content::WebContents* web_contents,
140 const gfx::Rect& rect) OVERRIDE {} 140 const gfx::Rect& rect) OVERRIDE {}
141 virtual void ShowAvatarBubbleFromAvatarButton() OVERRIDE {} 141 virtual void ShowAvatarBubbleFromAvatarButton() OVERRIDE {}
142 142
143 protected: 143 protected:
144 virtual void DestroyBrowser() OVERRIDE {} 144 virtual void DestroyBrowser() OVERRIDE {}
145 145
146 private: 146 private:
147 TestLocationBar location_bar_; 147 TestLocationBar location_bar_;
148 148
149 gfx::Rect bounds_;
150
149 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindow); 151 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindow);
150 }; 152 };
151 153
152 namespace chrome { 154 namespace chrome {
153 155
154 // Helpers that handle the lifetime of TestBrowserWindow instances. 156 // Helpers that handle the lifetime of TestBrowserWindow instances.
155 Browser* CreateBrowserWithTestWindowForProfile(Profile* profile); 157 Browser* CreateBrowserWithTestWindowForProfile(Profile* profile);
156 Browser* CreateBrowserWithTestWindowForParams(Browser::CreateParams* params); 158 Browser* CreateBrowserWithTestWindowForParams(Browser::CreateParams* params);
157 159
158 } // namespace chrome 160 } // namespace chrome
159 161
160 #endif // CHROME_TEST_BASE_TEST_BROWSER_WINDOW_H_ 162 #endif // CHROME_TEST_BASE_TEST_BROWSER_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698