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

Side by Side Diff: webkit/glue/webplugin_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/webplugin.h ('k') | webkit/glue/webtextinput.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-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 #include "config.h" 5 #include "config.h"
6 6
7 #include "Document.h" 7 #include "Document.h"
8 #include "DocumentLoader.h" 8 #include "DocumentLoader.h"
9 #include "Event.h" 9 #include "Event.h"
10 #include "EventNames.h" 10 #include "EventNames.h"
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 WebKit::webKitClient()->setCookies(url, policy_url, UTF8ToUTF16(cookie)); 632 WebKit::webKitClient()->setCookies(url, policy_url, UTF8ToUTF16(cookie));
633 } 633 }
634 634
635 std::string WebPluginImpl::GetCookies(const GURL& url, const GURL& policy_url) { 635 std::string WebPluginImpl::GetCookies(const GURL& url, const GURL& policy_url) {
636 return UTF16ToUTF8(WebKit::webKitClient()->cookies(url, policy_url)); 636 return UTF16ToUTF8(WebKit::webKitClient()->cookies(url, policy_url));
637 } 637 }
638 638
639 void WebPluginImpl::ShowModalHTMLDialog(const GURL& url, int width, int height, 639 void WebPluginImpl::ShowModalHTMLDialog(const GURL& url, int width, int height,
640 const std::string& json_arguments, 640 const std::string& json_arguments,
641 std::string* json_retval) { 641 std::string* json_retval) {
642 if (webframe_ && webframe_->GetView() && 642 if (webframe_ &&
643 webframe_->GetView()->GetDelegate()) { 643 webframe_->GetWebViewImpl() &&
644 webframe_->GetView()->GetDelegate()->ShowModalHTMLDialog( 644 webframe_->GetWebViewImpl()->GetDelegate()) {
645 webframe_->GetWebViewImpl()->GetDelegate()->ShowModalHTMLDialog(
645 url, width, height, json_arguments, json_retval); 646 url, width, height, json_arguments, json_retval);
646 } 647 }
647 } 648 }
648 649
649 void WebPluginImpl::OnMissingPluginStatus(int status) { 650 void WebPluginImpl::OnMissingPluginStatus(int status) {
650 NOTREACHED(); 651 NOTREACHED();
651 } 652 }
652 653
653 void WebPluginImpl::Invalidate() { 654 void WebPluginImpl::Invalidate() {
654 if (widget_) 655 if (widget_)
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 1065
1065 void WebPluginImpl::didFinishLoading(WebURLLoader* loader) { 1066 void WebPluginImpl::didFinishLoading(WebURLLoader* loader) {
1066 ClientInfo* client_info = GetClientInfoFromLoader(loader); 1067 ClientInfo* client_info = GetClientInfoFromLoader(loader);
1067 if (client_info && client_info->client) { 1068 if (client_info && client_info->client) {
1068 MultiPartResponseHandlerMap::iterator index = 1069 MultiPartResponseHandlerMap::iterator index =
1069 multi_part_response_map_.find(client_info->client); 1070 multi_part_response_map_.find(client_info->client);
1070 if (index != multi_part_response_map_.end()) { 1071 if (index != multi_part_response_map_.end()) {
1071 delete (*index).second; 1072 delete (*index).second;
1072 multi_part_response_map_.erase(index); 1073 multi_part_response_map_.erase(index);
1073 1074
1074 WebView* web_view = webframe_->GetView(); 1075 WebView* web_view = webframe_->GetWebViewImpl();
1075 web_view->GetDelegate()->DidStopLoading(web_view); 1076 web_view->GetDelegate()->DidStopLoading(web_view);
1076 } 1077 }
1077 loader->setDefersLoading(true); 1078 loader->setDefersLoading(true);
1078 WebPluginResourceClient* resource_client = client_info->client; 1079 WebPluginResourceClient* resource_client = client_info->client;
1079 // The ClientInfo can get deleted in the call to DidFinishLoading below. 1080 // The ClientInfo can get deleted in the call to DidFinishLoading below.
1080 // It is not safe to access this structure after that. 1081 // It is not safe to access this structure after that.
1081 client_info->client = NULL; 1082 client_info->client = NULL;
1082 resource_client->DidFinishLoading(); 1083 resource_client->DidFinishLoading();
1083 } 1084 }
1084 } 1085 }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 1327
1327 void WebPluginImpl::HandleHttpMultipartResponse( 1328 void WebPluginImpl::HandleHttpMultipartResponse(
1328 const WebURLResponse& response, WebPluginResourceClient* client) { 1329 const WebURLResponse& response, WebPluginResourceClient* client) {
1329 std::string multipart_boundary; 1330 std::string multipart_boundary;
1330 if (!MultipartResponseDelegate::ReadMultipartBoundary( 1331 if (!MultipartResponseDelegate::ReadMultipartBoundary(
1331 response, &multipart_boundary)) { 1332 response, &multipart_boundary)) {
1332 NOTREACHED(); 1333 NOTREACHED();
1333 return; 1334 return;
1334 } 1335 }
1335 1336
1336 WebView* web_view = webframe_->GetView(); 1337 WebView* web_view = webframe_->GetWebViewImpl();
1337 web_view->GetDelegate()->DidStartLoading(web_view); 1338 web_view->GetDelegate()->DidStartLoading(web_view);
1338 1339
1339 MultiPartResponseClient* multi_part_response_client = 1340 MultiPartResponseClient* multi_part_response_client =
1340 new MultiPartResponseClient(client); 1341 new MultiPartResponseClient(client);
1341 1342
1342 MultipartResponseDelegate* multi_part_response_handler = 1343 MultipartResponseDelegate* multi_part_response_handler =
1343 new MultipartResponseDelegate(multi_part_response_client, NULL, 1344 new MultipartResponseDelegate(multi_part_response_client, NULL,
1344 response, 1345 response,
1345 multipart_boundary); 1346 multipart_boundary);
1346 multi_part_response_map_[client] = multi_part_response_handler; 1347 multi_part_response_map_[client] = multi_part_response_handler;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 1468
1468 WebPluginGeometry move; 1469 WebPluginGeometry move;
1469 move.window = window_; 1470 move.window = window_;
1470 move.window_rect = gfx::Rect(); 1471 move.window_rect = gfx::Rect();
1471 move.clip_rect = gfx::Rect(); 1472 move.clip_rect = gfx::Rect();
1472 move.rects_valid = false; 1473 move.rects_valid = false;
1473 move.visible = widget_->isVisible(); 1474 move.visible = widget_->isVisible();
1474 1475
1475 webview->delegate()->DidMovePlugin(move); 1476 webview->delegate()->DidMovePlugin(move);
1476 } 1477 }
OLDNEW
« no previous file with comments | « webkit/glue/webplugin.h ('k') | webkit/glue/webtextinput.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698