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 // This file contains the implementation of TestWebViewDelegate, which serves | 5 // This file contains the implementation of TestWebViewDelegate, which serves |
6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to | 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to |
7 // have initialized a MessageLoop before these methods are called. | 7 // have initialized a MessageLoop before these methods are called. |
8 | 8 |
9 #include "webkit/tools/test_shell/test_webview_delegate.h" | 9 #include "webkit/tools/test_shell/test_webview_delegate.h" |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } // namespace | 87 } // namespace |
88 | 88 |
89 // WebViewDelegate ----------------------------------------------------------- | 89 // WebViewDelegate ----------------------------------------------------------- |
90 | 90 |
91 WebView* TestWebViewDelegate::CreateWebView(WebView* webview, | 91 WebView* TestWebViewDelegate::CreateWebView(WebView* webview, |
92 bool user_gesture) { | 92 bool user_gesture) { |
93 return shell_->CreateWebView(webview); | 93 return shell_->CreateWebView(webview); |
94 } | 94 } |
95 | 95 |
96 WebWidget* TestWebViewDelegate::CreatePopupWidget(WebView* webview, | 96 WebWidget* TestWebViewDelegate::CreatePopupWidget(WebView* webview, |
97 bool focus_on_show) { | 97 bool activatable) { |
98 return shell_->CreatePopupWidget(webview); | 98 return shell_->CreatePopupWidget(webview); |
99 } | 99 } |
100 | 100 |
101 void TestWebViewDelegate::OpenURL(WebView* webview, const GURL& url, | 101 void TestWebViewDelegate::OpenURL(WebView* webview, const GURL& url, |
102 const GURL& referrer, | 102 const GURL& referrer, |
103 WindowOpenDisposition disposition) { | 103 WindowOpenDisposition disposition) { |
104 DCHECK_NE(disposition, CURRENT_TAB); // No code for this | 104 DCHECK_NE(disposition, CURRENT_TAB); // No code for this |
105 if (disposition == SUPPRESS_OPEN) | 105 if (disposition == SUPPRESS_OPEN) |
106 return; | 106 return; |
107 TestShell* shell = NULL; | 107 TestShell* shell = NULL; |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 else | 825 else |
826 return L"main frame"; | 826 return L"main frame"; |
827 } else { | 827 } else { |
828 if (name.length()) | 828 if (name.length()) |
829 return L"frame \"" + name + L"\""; | 829 return L"frame \"" + name + L"\""; |
830 else | 830 else |
831 return L"frame (anonymous)"; | 831 return L"frame (anonymous)"; |
832 } | 832 } |
833 } | 833 } |
834 | 834 |
OLD | NEW |