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 #include "chrome/browser/printing/print_preview_test.h" | 5 #include "chrome/browser/printing/print_preview_test.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_iterator.h" | 9 #include "chrome/browser/ui/browser_iterator.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // WebContents window since there is no true browser window for unit tests. | 39 // WebContents window since there is no true browser window for unit tests. |
40 virtual gfx::NativeView GetHostView() const OVERRIDE { | 40 virtual gfx::NativeView GetHostView() const OVERRIDE { |
41 return FindBrowser()->tab_strip_model()->GetActiveWebContents()->GetView()-> | 41 return FindBrowser()->tab_strip_model()->GetActiveWebContents()->GetView()-> |
42 GetNativeView(); | 42 GetNativeView(); |
43 } | 43 } |
44 | 44 |
45 virtual gfx::Point GetDialogPosition(const gfx::Size& size) OVERRIDE { | 45 virtual gfx::Point GetDialogPosition(const gfx::Size& size) OVERRIDE { |
46 return gfx::Point(); | 46 return gfx::Point(); |
47 } | 47 } |
48 | 48 |
| 49 virtual gfx::Size GetMaximumDialogSize() OVERRIDE { |
| 50 return gfx::Size(); |
| 51 } |
| 52 |
49 virtual void AddObserver( | 53 virtual void AddObserver( |
50 WebContentsModalDialogHostObserver* observer) OVERRIDE {} | 54 WebContentsModalDialogHostObserver* observer) OVERRIDE {} |
51 virtual void RemoveObserver( | 55 virtual void RemoveObserver( |
52 WebContentsModalDialogHostObserver* observer) OVERRIDE {} | 56 WebContentsModalDialogHostObserver* observer) OVERRIDE {} |
53 | 57 |
54 private: | 58 private: |
55 Browser* FindBrowser() const { | 59 Browser* FindBrowser() const { |
56 for (chrome::BrowserIterator it; !it.done(); it.Next()) { | 60 for (chrome::BrowserIterator it; !it.done(); it.Next()) { |
57 Browser* browser = *it; | 61 Browser* browser = *it; |
58 if (browser->window() == this) | 62 if (browser->window() == this) |
(...skipping 19 matching lines...) Expand all Loading... |
78 // ShadowingAtExitManager in our base class). | 82 // ShadowingAtExitManager in our base class). |
79 content::PluginService::GetInstance()->Init(); | 83 content::PluginService::GetInstance()->Init(); |
80 content::PluginService::GetInstance()->DisablePluginsDiscoveryForTesting(); | 84 content::PluginService::GetInstance()->DisablePluginsDiscoveryForTesting(); |
81 | 85 |
82 profile()->GetPrefs()->SetBoolean(prefs::kPrintPreviewDisabled, false); | 86 profile()->GetPrefs()->SetBoolean(prefs::kPrintPreviewDisabled, false); |
83 } | 87 } |
84 | 88 |
85 BrowserWindow* PrintPreviewTest::CreateBrowserWindow() { | 89 BrowserWindow* PrintPreviewTest::CreateBrowserWindow() { |
86 return new PrintPreviewTestBrowserWindow; | 90 return new PrintPreviewTestBrowserWindow; |
87 } | 91 } |
OLD | NEW |