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

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 8186: Plumb the referrer throughout the OpenURL APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 actual_mime_type)) 105 actual_mime_type))
106 return NULL; 106 return NULL;
107 107
108 if (actual_mime_type && !actual_mime_type->empty()) 108 if (actual_mime_type && !actual_mime_type->empty())
109 return WebPluginDelegateImpl::Create(info.file, *actual_mime_type, hwnd); 109 return WebPluginDelegateImpl::Create(info.file, *actual_mime_type, hwnd);
110 else 110 else
111 return WebPluginDelegateImpl::Create(info.file, mime_type, hwnd); 111 return WebPluginDelegateImpl::Create(info.file, mime_type, hwnd);
112 } 112 }
113 113
114 void TestWebViewDelegate::OpenURL(WebView* webview, const GURL& url, 114 void TestWebViewDelegate::OpenURL(WebView* webview, const GURL& url,
115 const GURL& referrer,
115 WindowOpenDisposition disposition) { 116 WindowOpenDisposition disposition) {
116 DCHECK_NE(disposition, CURRENT_TAB); // No code for this 117 DCHECK_NE(disposition, CURRENT_TAB); // No code for this
117 if (disposition == SUPPRESS_OPEN) 118 if (disposition == SUPPRESS_OPEN)
118 return; 119 return;
119 TestShell* shell; 120 TestShell* shell;
120 if (TestShell::CreateNewWindow(UTF8ToWide(url.spec()), &shell)) 121 if (TestShell::CreateNewWindow(UTF8ToWide(url.spec()), &shell))
121 shell->Show(shell->webView(), disposition); 122 shell->Show(shell->webView(), disposition);
122 } 123 }
123 124
124 void TestWebViewDelegate::DidStartLoading(WebView* webview) { 125 void TestWebViewDelegate::DidStartLoading(WebView* webview) {
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 else 913 else
913 return L"main frame"; 914 return L"main frame";
914 } else { 915 } else {
915 if (name.length()) 916 if (name.length())
916 return L"frame \"" + name + L"\""; 917 return L"frame \"" + name + L"\"";
917 else 918 else
918 return L"frame (anonymous)"; 919 return L"frame (anonymous)";
919 } 920 }
920 } 921 }
921 922
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698