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

Side by Side Diff: webkit/glue/plugins/webplugin_impl.cc

Issue 5783004: Keep deinlining stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Well, it all compiles locally? Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/glue/plugins/webplugin_impl.h" 5 #include "webkit/glue/plugins/webplugin_impl.h"
6 6
7 #include "base/linked_ptr.h" 7 #include "base/linked_ptr.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 page_delegate_->CreatedPluginWindow(window); 555 page_delegate_->CreatedPluginWindow(window);
556 } 556 }
557 } else { 557 } else {
558 DCHECK(!window_); // Make sure not called twice. 558 DCHECK(!window_); // Make sure not called twice.
559 windowless_ = true; 559 windowless_ = true;
560 accepts_input_events_ = true; 560 accepts_input_events_ = true;
561 } 561 }
562 #endif 562 #endif
563 } 563 }
564 564
565 void WebPluginImpl::SetAcceptsInputEvents(bool accepts) {
566 accepts_input_events_ = accepts;
567 }
568
565 void WebPluginImpl::WillDestroyWindow(gfx::PluginWindowHandle window) { 569 void WebPluginImpl::WillDestroyWindow(gfx::PluginWindowHandle window) {
566 DCHECK_EQ(window, window_); 570 DCHECK_EQ(window, window_);
567 window_ = gfx::kNullPluginWindow; 571 window_ = gfx::kNullPluginWindow;
568 if (page_delegate_) 572 if (page_delegate_)
569 page_delegate_->WillDestroyPluginWindow(window); 573 page_delegate_->WillDestroyPluginWindow(window);
570 } 574 }
571 575
572 GURL WebPluginImpl::CompleteURL(const char* url) { 576 GURL WebPluginImpl::CompleteURL(const char* url) {
573 if (!webframe_) { 577 if (!webframe_) {
574 NOTREACHED(); 578 NOTREACHED();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 WebHTTPBody http_body; 620 WebHTTPBody http_body;
617 if (body.size()) { 621 if (body.size()) {
618 http_body.initialize(); 622 http_body.initialize();
619 http_body.appendData(WebData(&body[0], body.size())); 623 http_body.appendData(WebData(&body[0], body.size()));
620 } 624 }
621 request->setHTTPBody(http_body); 625 request->setHTTPBody(http_body);
622 626
623 return rv; 627 return rv;
624 } 628 }
625 629
630 WebPluginDelegate* WebPluginImpl::delegate() {
631 return delegate_;
632 }
633
626 bool WebPluginImpl::IsValidUrl(const GURL& url, Referrer referrer_flag) { 634 bool WebPluginImpl::IsValidUrl(const GURL& url, Referrer referrer_flag) {
627 if (referrer_flag == PLUGIN_SRC && 635 if (referrer_flag == PLUGIN_SRC &&
628 mime_type_ == "application/x-shockwave-flash" && 636 mime_type_ == "application/x-shockwave-flash" &&
629 url.GetOrigin() != plugin_url_.GetOrigin()) { 637 url.GetOrigin() != plugin_url_.GetOrigin()) {
630 // Do url check to make sure that there are no @, ;, \ chars in between url 638 // Do url check to make sure that there are no @, ;, \ chars in between url
631 // scheme and url path. 639 // scheme and url path.
632 const char* url_to_check(url.spec().data()); 640 const char* url_to_check(url.spec().data());
633 url_parse::Parsed parsed; 641 url_parse::Parsed parsed;
634 url_parse::ParseStandardURL(url_to_check, strlen(url_to_check), &parsed); 642 url_parse::ParseStandardURL(url_to_check, strlen(url_to_check), &parsed);
635 if (parsed.path.begin <= parsed.scheme.end()) 643 if (parsed.path.begin <= parsed.scheme.end())
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 // Report that resource loading finished. 1251 // Report that resource loading finished.
1244 if (WebDevToolsAgent* devtools_agent = GetDevToolsAgent()) 1252 if (WebDevToolsAgent* devtools_agent = GetDevToolsAgent())
1245 devtools_agent->didFinishLoading(resource_id); 1253 devtools_agent->didFinishLoading(resource_id);
1246 } 1254 }
1247 break; 1255 break;
1248 } 1256 }
1249 client_index++; 1257 client_index++;
1250 } 1258 }
1251 } 1259 }
1252 1260
1261 bool WebPluginImpl::IsOffTheRecord() {
1262 return false;
1263 }
1264
1253 void WebPluginImpl::HandleHttpMultipartResponse( 1265 void WebPluginImpl::HandleHttpMultipartResponse(
1254 const WebURLResponse& response, WebPluginResourceClient* client) { 1266 const WebURLResponse& response, WebPluginResourceClient* client) {
1255 std::string multipart_boundary; 1267 std::string multipart_boundary;
1256 if (!MultipartResponseDelegate::ReadMultipartBoundary( 1268 if (!MultipartResponseDelegate::ReadMultipartBoundary(
1257 response, &multipart_boundary)) { 1269 response, &multipart_boundary)) {
1258 NOTREACHED(); 1270 NOTREACHED();
1259 return; 1271 return;
1260 } 1272 }
1261 1273
1262 if (page_delegate_) 1274 if (page_delegate_)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { 1384 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() {
1373 if (!webframe_) 1385 if (!webframe_)
1374 return NULL; 1386 return NULL;
1375 WebView* view = webframe_->view(); 1387 WebView* view = webframe_->view();
1376 if (!view) 1388 if (!view)
1377 return NULL; 1389 return NULL;
1378 return view->devToolsAgent(); 1390 return view->devToolsAgent();
1379 } 1391 }
1380 1392
1381 } // namespace webkit_glue 1393 } // namespace webkit_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698