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

Side by Side Diff: content/renderer/npapi/webplugin_impl.cc

Issue 470983004: Move blink<->cc bindings to cc/blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/npapi/webplugin_impl.h" 5 #include "content/renderer/npapi/webplugin_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/linked_ptr.h" 11 #include "base/memory/linked_ptr.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/metrics/user_metrics_action.h" 13 #include "base/metrics/user_metrics_action.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "cc/blink/web_layer_impl.h"
17 #include "cc/layers/io_surface_layer.h" 18 #include "cc/layers/io_surface_layer.h"
18 #include "content/child/appcache/web_application_cache_host_impl.h" 19 #include "content/child/appcache/web_application_cache_host_impl.h"
19 #include "content/child/multipart_response_delegate.h" 20 #include "content/child/multipart_response_delegate.h"
20 #include "content/child/npapi/plugin_host.h" 21 #include "content/child/npapi/plugin_host.h"
21 #include "content/child/npapi/plugin_instance.h" 22 #include "content/child/npapi/plugin_instance.h"
22 #include "content/child/npapi/webplugin_delegate_impl.h" 23 #include "content/child/npapi/webplugin_delegate_impl.h"
23 #include "content/child/npapi/webplugin_resource_client.h" 24 #include "content/child/npapi/webplugin_resource_client.h"
24 #include "content/common/view_messages.h" 25 #include "content/common/view_messages.h"
25 #include "content/public/common/content_constants.h" 26 #include "content/public/common/content_constants.h"
26 #include "content/public/common/content_switches.h" 27 #include "content/public/common/content_switches.h"
27 #include "content/public/renderer/content_renderer_client.h" 28 #include "content/public/renderer/content_renderer_client.h"
28 #include "content/renderer/compositor_bindings/web_layer_impl.h"
29 #include "content/renderer/npapi/webplugin_delegate_proxy.h" 29 #include "content/renderer/npapi/webplugin_delegate_proxy.h"
30 #include "content/renderer/render_frame_impl.h" 30 #include "content/renderer/render_frame_impl.h"
31 #include "content/renderer/render_process.h" 31 #include "content/renderer/render_process.h"
32 #include "content/renderer/render_thread_impl.h" 32 #include "content/renderer/render_thread_impl.h"
33 #include "content/renderer/render_view_impl.h" 33 #include "content/renderer/render_view_impl.h"
34 #include "net/base/escape.h" 34 #include "net/base/escape.h"
35 #include "net/base/net_errors.h" 35 #include "net/base/net_errors.h"
36 #include "net/http/http_response_headers.h" 36 #include "net/http/http_response_headers.h"
37 #include "skia/ext/platform_canvas.h" 37 #include "skia/ext/platform_canvas.h"
38 #include "third_party/WebKit/public/platform/WebCString.h" 38 #include "third_party/WebKit/public/platform/WebCString.h"
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 // work around garbage occasionally showing up in the plugin's 844 // work around garbage occasionally showing up in the plugin's
845 // area during live resizing of Core Animation plugins. The 845 // area during live resizing of Core Animation plugins. The
846 // assumption was that by the time this was called, the plugin 846 // assumption was that by the time this was called, the plugin
847 // process would have populated the newly allocated IOSurface. It 847 // process would have populated the newly allocated IOSurface. It
848 // is not 100% clear at this point why any garbage is getting 848 // is not 100% clear at this point why any garbage is getting
849 // through. More investigation is needed. http://crbug.com/105346 849 // through. More investigation is needed. http://crbug.com/105346
850 if (next_io_surface_allocated_) { 850 if (next_io_surface_allocated_) {
851 if (next_io_surface_id_) { 851 if (next_io_surface_id_) {
852 if (!io_surface_layer_.get()) { 852 if (!io_surface_layer_.get()) {
853 io_surface_layer_ = cc::IOSurfaceLayer::Create(); 853 io_surface_layer_ = cc::IOSurfaceLayer::Create();
854 web_layer_.reset(new WebLayerImpl(io_surface_layer_)); 854 web_layer_.reset(new cc_blink::WebLayerImpl(io_surface_layer_));
855 container_->setWebLayer(web_layer_.get()); 855 container_->setWebLayer(web_layer_.get());
856 } 856 }
857 io_surface_layer_->SetIOSurfaceProperties( 857 io_surface_layer_->SetIOSurfaceProperties(
858 next_io_surface_id_, 858 next_io_surface_id_,
859 gfx::Size(next_io_surface_width_, next_io_surface_height_)); 859 gfx::Size(next_io_surface_width_, next_io_surface_height_));
860 } else { 860 } else {
861 container_->setWebLayer(NULL); 861 container_->setWebLayer(NULL);
862 web_layer_.reset(); 862 web_layer_.reset();
863 io_surface_layer_ = NULL; 863 io_surface_layer_ = NULL;
864 } 864 }
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 case PLUGIN_SRC: 1525 case PLUGIN_SRC:
1526 webframe_->setReferrerForRequest(*request, plugin_url_); 1526 webframe_->setReferrerForRequest(*request, plugin_url_);
1527 break; 1527 break;
1528 1528
1529 default: 1529 default:
1530 break; 1530 break;
1531 } 1531 }
1532 } 1532 }
1533 1533
1534 } // namespace content 1534 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698