OLD | NEW |
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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.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 { |
| 16 class Extension; |
| 17 } |
| 18 |
15 // An implementation of BrowserWindow used for testing. TestBrowserWindow only | 19 // An implementation of BrowserWindow used for testing. TestBrowserWindow only |
16 // contains a valid LocationBar, all other getters return NULL. | 20 // contains a valid LocationBar, all other getters return NULL. |
17 // See BrowserWithTestWindowTest for an example of using this class. | 21 // See BrowserWithTestWindowTest for an example of using this class. |
18 class TestBrowserWindow : public BrowserWindow { | 22 class TestBrowserWindow : public BrowserWindow { |
19 public: | 23 public: |
20 explicit TestBrowserWindow(Browser* browser); | 24 explicit TestBrowserWindow(Browser* browser); |
21 virtual ~TestBrowserWindow(); | 25 virtual ~TestBrowserWindow(); |
22 | 26 |
23 // BrowserWindow: | 27 // BrowserWindow: |
24 virtual void Show() OVERRIDE {} | 28 virtual void Show() OVERRIDE {} |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual void ShowAppMenu() OVERRIDE {} | 72 virtual void ShowAppMenu() OVERRIDE {} |
69 virtual bool PreHandleKeyboardEvent( | 73 virtual bool PreHandleKeyboardEvent( |
70 const content::NativeWebKeyboardEvent& event, | 74 const content::NativeWebKeyboardEvent& event, |
71 bool* is_keyboard_shortcut) OVERRIDE; | 75 bool* is_keyboard_shortcut) OVERRIDE; |
72 virtual void HandleKeyboardEvent( | 76 virtual void HandleKeyboardEvent( |
73 const content::NativeWebKeyboardEvent& event) OVERRIDE {} | 77 const content::NativeWebKeyboardEvent& event) OVERRIDE {} |
74 virtual void ShowCreateWebAppShortcutsDialog( | 78 virtual void ShowCreateWebAppShortcutsDialog( |
75 TabContentsWrapper* tab_contents) OVERRIDE {} | 79 TabContentsWrapper* tab_contents) OVERRIDE {} |
76 virtual void ShowCreateChromeAppShortcutsDialog( | 80 virtual void ShowCreateChromeAppShortcutsDialog( |
77 Profile* profile, | 81 Profile* profile, |
78 const Extension* app) OVERRIDE {} | 82 const extensions::Extension* app) OVERRIDE {} |
79 | 83 |
80 virtual bool IsBookmarkBarVisible() const OVERRIDE; | 84 virtual bool IsBookmarkBarVisible() const OVERRIDE; |
81 virtual bool IsBookmarkBarAnimating() const OVERRIDE; | 85 virtual bool IsBookmarkBarAnimating() const OVERRIDE; |
82 virtual bool IsTabStripEditable() const OVERRIDE; | 86 virtual bool IsTabStripEditable() const OVERRIDE; |
83 virtual bool IsToolbarVisible() const OVERRIDE; | 87 virtual bool IsToolbarVisible() const OVERRIDE; |
84 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; | 88 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; |
85 virtual bool IsPanel() const OVERRIDE; | 89 virtual bool IsPanel() const OVERRIDE; |
86 virtual void ConfirmAddSearchProvider(TemplateURL* template_url, | 90 virtual void ConfirmAddSearchProvider(TemplateURL* template_url, |
87 Profile* profile) OVERRIDE {} | 91 Profile* profile) OVERRIDE {} |
88 virtual void ToggleBookmarkBar() OVERRIDE {} | 92 virtual void ToggleBookmarkBar() OVERRIDE {} |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 protected: | 142 protected: |
139 virtual void DestroyBrowser() OVERRIDE {} | 143 virtual void DestroyBrowser() OVERRIDE {} |
140 | 144 |
141 private: | 145 private: |
142 TestLocationBar location_bar_; | 146 TestLocationBar location_bar_; |
143 | 147 |
144 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindow); | 148 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindow); |
145 }; | 149 }; |
146 | 150 |
147 #endif // CHROME_TEST_BASE_TEST_BROWSER_WINDOW_H_ | 151 #endif // CHROME_TEST_BASE_TEST_BROWSER_WINDOW_H_ |
OLD | NEW |