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

Side by Side Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 164225: Switch to WebFrame from the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months 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/glue/webframe_unittest.cc ('k') | webkit/glue/webkit_glue.h » ('j') | 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-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 "config.h" 5 #include "config.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "Chrome.h" 10 #include "Chrome.h"
(...skipping 26 matching lines...) Expand all
37 #include "webkit/api/public/WebForm.h" 37 #include "webkit/api/public/WebForm.h"
38 #include "webkit/api/public/WebURL.h" 38 #include "webkit/api/public/WebURL.h"
39 #include "webkit/api/public/WebURLError.h" 39 #include "webkit/api/public/WebURLError.h"
40 #include "webkit/api/public/WebVector.h" 40 #include "webkit/api/public/WebVector.h"
41 #include "webkit/api/src/WrappedResourceRequest.h" 41 #include "webkit/api/src/WrappedResourceRequest.h"
42 #include "webkit/api/src/WrappedResourceResponse.h" 42 #include "webkit/api/src/WrappedResourceResponse.h"
43 #include "webkit/glue/glue_util.h" 43 #include "webkit/glue/glue_util.h"
44 #include "webkit/glue/plugins/plugin_list.h" 44 #include "webkit/glue/plugins/plugin_list.h"
45 #include "webkit/glue/webdatasource_impl.h" 45 #include "webkit/glue/webdatasource_impl.h"
46 #include "webkit/glue/webdevtoolsagent_impl.h" 46 #include "webkit/glue/webdevtoolsagent_impl.h"
47 #include "webkit/glue/webframe_impl.h"
47 #include "webkit/glue/webframeloaderclient_impl.h" 48 #include "webkit/glue/webframeloaderclient_impl.h"
48 #include "webkit/glue/webkit_glue.h" 49 #include "webkit/glue/webkit_glue.h"
49 #include "webkit/glue/webplugin_delegate.h" 50 #include "webkit/glue/webplugin_delegate.h"
50 #include "webkit/glue/webplugin_impl.h" 51 #include "webkit/glue/webplugin_impl.h"
51 #include "webkit/glue/webview_delegate.h" 52 #include "webkit/glue/webview_delegate.h"
52 #include "webkit/glue/webview_impl.h" 53 #include "webkit/glue/webview_impl.h"
53 54
54 using namespace WebCore; 55 using namespace WebCore;
55 56
56 using base::Time; 57 using base::Time;
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 } 482 }
482 483
483 void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url, 484 void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url,
484 double interval, 485 double interval,
485 double fire_date) { 486 double fire_date) {
486 // Tells dispatchDidStartProvisionalLoad that if it sees this item it is a 487 // Tells dispatchDidStartProvisionalLoad that if it sees this item it is a
487 // redirect and the source item should be added as the start of the chain. 488 // redirect and the source item should be added as the start of the chain.
488 WebViewImpl* webview = webframe_->GetWebViewImpl(); 489 WebViewImpl* webview = webframe_->GetWebViewImpl();
489 WebViewDelegate* d = webview ? webview->delegate() : NULL; 490 WebViewDelegate* d = webview ? webview->delegate() : NULL;
490 if (d) { 491 if (d) {
491 expected_client_redirect_src_ = webframe_->GetURL(); 492 expected_client_redirect_src_ = webframe_->url();
492 expected_client_redirect_dest_ = webkit_glue::KURLToGURL(url); 493 expected_client_redirect_dest_ = webkit_glue::KURLToGURL(url);
493 494
494 // TODO(timsteele): bug 1135512. Webkit does not properly notify us of 495 // TODO(timsteele): bug 1135512. Webkit does not properly notify us of
495 // cancelling http > file client redirects. Since the FrameLoader's policy 496 // cancelling http > file client redirects. Since the FrameLoader's policy
496 // is to never carry out such a navigation anyway, the best thing we can do 497 // is to never carry out such a navigation anyway, the best thing we can do
497 // for now to not get confused is ignore this notification. 498 // for now to not get confused is ignore this notification.
498 if (expected_client_redirect_dest_.SchemeIsFile() && 499 if (expected_client_redirect_dest_.SchemeIsFile() &&
499 (expected_client_redirect_src_.SchemeIs("http") || 500 (expected_client_redirect_src_.SchemeIs("http") ||
500 expected_client_redirect_src_.SchemeIsSecure())) { 501 expected_client_redirect_src_.SchemeIsSecure())) {
501 expected_client_redirect_src_ = GURL(); 502 expected_client_redirect_src_ = GURL();
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 GURL gurl = webkit_glue::KURLToGURL(url); 1247 GURL gurl = webkit_glue::KURLToGURL(url);
1247 std::string my_mime_type = 1248 std::string my_mime_type =
1248 webkit_glue::CStringToStdString(mime_type.latin1()); 1249 webkit_glue::CStringToStdString(mime_type.latin1());
1249 StringToLowerASCII(&my_mime_type); 1250 StringToLowerASCII(&my_mime_type);
1250 1251
1251 // Get the classid and version from attributes of the object. 1252 // Get the classid and version from attributes of the object.
1252 std::string combined_clsid; 1253 std::string combined_clsid;
1253 #if defined(OS_WIN) 1254 #if defined(OS_WIN)
1254 std::string clsid, version; 1255 std::string clsid, version;
1255 if (activex_shim::IsMimeTypeActiveX(my_mime_type)) { 1256 if (activex_shim::IsMimeTypeActiveX(my_mime_type)) {
1256 GURL url = webframe_->GetURL(); 1257 GURL url = webframe_->url();
1257 for (unsigned int i = 0; i < param_names.size(); i++) { 1258 for (unsigned int i = 0; i < param_names.size(); i++) {
1258 String lowercase_param_name = param_names[i].lower(); 1259 String lowercase_param_name = param_names[i].lower();
1259 if (lowercase_param_name == "classid") { 1260 if (lowercase_param_name == "classid") {
1260 activex_shim::GetClsidFromClassidAttribute( 1261 activex_shim::GetClsidFromClassidAttribute(
1261 webkit_glue::CStringToStdString(param_values[i].latin1()), &clsid); 1262 webkit_glue::CStringToStdString(param_values[i].latin1()), &clsid);
1262 } else if (lowercase_param_name == "codebase") { 1263 } else if (lowercase_param_name == "codebase") {
1263 version = activex_shim::GetVersionFromCodebaseAttribute( 1264 version = activex_shim::GetVersionFromCodebaseAttribute(
1264 webkit_glue::CStringToStdString(param_values[i].latin1())); 1265 webkit_glue::CStringToStdString(param_values[i].latin1()));
1265 } 1266 }
1266 } 1267 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 1424
1424 std::string offset_str = url.ExtractFileName(); 1425 std::string offset_str = url.ExtractFileName();
1425 int offset; 1426 int offset;
1426 if (!StringToInt(offset_str, &offset)) 1427 if (!StringToInt(offset_str, &offset))
1427 return; 1428 return;
1428 1429
1429 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate(); 1430 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate();
1430 if (d) 1431 if (d)
1431 d->NavigateBackForwardSoon(offset); 1432 d->NavigateBackForwardSoon(offset);
1432 } 1433 }
OLDNEW
« no previous file with comments | « webkit/glue/webframe_unittest.cc ('k') | webkit/glue/webkit_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698