| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TEST_BROWSER_WINDOW_H_ | 5 #ifndef CHROME_TEST_TEST_BROWSER_WINDOW_H_ |
| 6 #define CHROME_TEST_TEST_BROWSER_WINDOW_H_ | 6 #define CHROME_TEST_TEST_BROWSER_WINDOW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/browser.h" | 8 #include "chrome/browser/browser.h" |
| 9 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
| 10 #include "chrome/browser/views/tabs/tab_strip.h" | 10 #include "chrome/browser/views/tabs/tab_strip.h" |
| 11 #include "chrome/test/test_location_bar.h" | 11 #include "chrome/test/test_location_bar.h" |
| 12 | 12 |
| 13 // An implementation of BrowserWindow used for testing. TestBrowserWindow only | 13 // An implementation of BrowserWindow used for testing. TestBrowserWindow only |
| 14 // contains a valid TabStrip, all other getters return NULL. | 14 // contains a valid TabStrip, all other getters return NULL. |
| 15 // See BrowserWithTestWindowTest for an example of using this class. | 15 // See BrowserWithTestWindowTest for an example of using this class. |
| 16 class TestBrowserWindow : public BrowserWindow { | 16 class TestBrowserWindow : public BrowserWindow { |
| 17 public: | 17 public: |
| 18 explicit TestBrowserWindow(Browser* browser) | 18 explicit TestBrowserWindow(Browser* browser) |
| 19 : tab_strip_(browser->tabstrip_model()) { | 19 : tab_strip_(browser->tabstrip_model()) { |
| 20 } | 20 } |
| 21 ~TestBrowserWindow() {} | 21 ~TestBrowserWindow() {} |
| 22 | 22 |
| 23 virtual void Init() {} | 23 virtual void Init() {} |
| 24 virtual void Show() {} | 24 virtual void Show() {} |
| 25 virtual void SetBounds(const gfx::Rect& bounds) {} | 25 virtual void SetBounds(const gfx::Rect& bounds) {} |
| 26 virtual void Close() {} | 26 virtual void Close() {} |
| 27 virtual void Activate() {} | 27 virtual void Activate() {} |
| 28 virtual bool IsActive() const { return false; } | 28 virtual bool IsActive() const { return false; } |
| 29 virtual void FlashFrame() {} | 29 virtual void FlashFrame() {} |
| 30 virtual void* GetNativeHandle() { return NULL; } | 30 virtual gfx::NativeWindow GetNativeHandle() { return NULL; } |
| 31 virtual BrowserWindowTesting* GetBrowserWindowTesting() { return NULL; } | 31 virtual BrowserWindowTesting* GetBrowserWindowTesting() { return NULL; } |
| 32 virtual StatusBubble* GetStatusBubble() { return NULL; } | 32 virtual StatusBubble* GetStatusBubble() { return NULL; } |
| 33 virtual void SelectedTabToolbarSizeChanged(bool is_animating) {} | 33 virtual void SelectedTabToolbarSizeChanged(bool is_animating) {} |
| 34 virtual void UpdateTitleBar() {} | 34 virtual void UpdateTitleBar() {} |
| 35 virtual void UpdateLoadingAnimations(bool should_animate) {} | 35 virtual void UpdateLoadingAnimations(bool should_animate) {} |
| 36 virtual void SetStarredState(bool is_starred) {} | 36 virtual void SetStarredState(bool is_starred) {} |
| 37 virtual gfx::Rect GetNormalBounds() const { return gfx::Rect(); } | 37 virtual gfx::Rect GetNormalBounds() const { return gfx::Rect(); } |
| 38 virtual bool IsMaximized() const { return false; } | 38 virtual bool IsMaximized() const { return false; } |
| 39 virtual void SetFullscreen(bool fullscreen) {} | 39 virtual void SetFullscreen(bool fullscreen) {} |
| 40 virtual bool IsFullscreen() const { return false; } | 40 virtual bool IsFullscreen() const { return false; } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 TabStrip tab_strip_; | 71 TabStrip tab_strip_; |
| 72 | 72 |
| 73 TestLocationBar location_bar_; | 73 TestLocationBar location_bar_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindow); | 75 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindow); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 #endif // CHROME_TEST_TEST_BROWSER_WINDOW_H_ | 78 #endif // CHROME_TEST_TEST_BROWSER_WINDOW_H_ |
| OLD | NEW |