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

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_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
« no previous file with comments | « content/renderer/npapi/webplugin_impl.cc ('k') | content/renderer/render_thread_impl.cc » ('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) 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/pepper/pepper_plugin_instance_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "base/strings/utf_offset_string_conversions.h" 16 #include "base/strings/utf_offset_string_conversions.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "cc/base/latency_info_swap_promise.h" 19 #include "cc/base/latency_info_swap_promise.h"
20 #include "cc/blink/web_layer_impl.h"
20 #include "cc/layers/texture_layer.h" 21 #include "cc/layers/texture_layer.h"
21 #include "cc/trees/layer_tree_host.h" 22 #include "cc/trees/layer_tree_host.h"
22 #include "content/common/content_constants_internal.h" 23 #include "content/common/content_constants_internal.h"
23 #include "content/common/input/web_input_event_traits.h" 24 #include "content/common/input/web_input_event_traits.h"
24 #include "content/public/common/content_switches.h" 25 #include "content/public/common/content_switches.h"
25 #include "content/public/common/page_zoom.h" 26 #include "content/public/common/page_zoom.h"
26 #include "content/public/renderer/content_renderer_client.h" 27 #include "content/public/renderer/content_renderer_client.h"
27 #include "content/renderer/compositor_bindings/web_layer_impl.h"
28 #include "content/renderer/gpu/render_widget_compositor.h" 28 #include "content/renderer/gpu/render_widget_compositor.h"
29 #include "content/renderer/pepper/content_decryptor_delegate.h" 29 #include "content/renderer/pepper/content_decryptor_delegate.h"
30 #include "content/renderer/pepper/event_conversion.h" 30 #include "content/renderer/pepper/event_conversion.h"
31 #include "content/renderer/pepper/fullscreen_container.h" 31 #include "content/renderer/pepper/fullscreen_container.h"
32 #include "content/renderer/pepper/gfx_conversion.h" 32 #include "content/renderer/pepper/gfx_conversion.h"
33 #include "content/renderer/pepper/host_dispatcher_wrapper.h" 33 #include "content/renderer/pepper/host_dispatcher_wrapper.h"
34 #include "content/renderer/pepper/host_globals.h" 34 #include "content/renderer/pepper/host_globals.h"
35 #include "content/renderer/pepper/message_channel.h" 35 #include "content/renderer/pepper/message_channel.h"
36 #include "content/renderer/pepper/npapi_glue.h" 36 #include "content/renderer/pepper/npapi_glue.h"
37 #include "content/renderer/pepper/pepper_browser_connection.h" 37 #include "content/renderer/pepper/pepper_browser_connection.h"
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after
2076 bound_graphics_2d_platform_->AttachedToNewLayer(); 2076 bound_graphics_2d_platform_->AttachedToNewLayer();
2077 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque(); 2077 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque();
2078 texture_layer_->SetFlipped(false); 2078 texture_layer_->SetFlipped(false);
2079 } 2079 }
2080 2080
2081 // Ignore transparency in fullscreen, since that's what Flash always 2081 // Ignore transparency in fullscreen, since that's what Flash always
2082 // wants to do, and that lets it not recreate a context if 2082 // wants to do, and that lets it not recreate a context if
2083 // wmode=transparent was specified. 2083 // wmode=transparent was specified.
2084 opaque = opaque || fullscreen_container_; 2084 opaque = opaque || fullscreen_container_;
2085 texture_layer_->SetContentsOpaque(opaque); 2085 texture_layer_->SetContentsOpaque(opaque);
2086 web_layer_.reset(new WebLayerImpl(texture_layer_)); 2086 web_layer_.reset(new cc_blink::WebLayerImpl(texture_layer_));
2087 } else if (want_compositor_layer) { 2087 } else if (want_compositor_layer) {
2088 compositor_layer_ = bound_compositor_->layer(); 2088 compositor_layer_ = bound_compositor_->layer();
2089 web_layer_.reset(new WebLayerImpl(compositor_layer_)); 2089 web_layer_.reset(new cc_blink::WebLayerImpl(compositor_layer_));
2090 } 2090 }
2091 2091
2092 if (web_layer_) { 2092 if (web_layer_) {
2093 if (fullscreen_container_) { 2093 if (fullscreen_container_) {
2094 fullscreen_container_->SetLayer(web_layer_.get()); 2094 fullscreen_container_->SetLayer(web_layer_.get());
2095 } else { 2095 } else {
2096 container_->setWebLayer(web_layer_.get()); 2096 container_->setWebLayer(web_layer_.get());
2097 } 2097 }
2098 } 2098 }
2099 2099
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
3320 // Running out-of-process. Initiate an IPC call to notify the plugin 3320 // Running out-of-process. Initiate an IPC call to notify the plugin
3321 // process. 3321 // process.
3322 ppapi::proxy::HostDispatcher* dispatcher = 3322 ppapi::proxy::HostDispatcher* dispatcher =
3323 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); 3323 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance());
3324 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( 3324 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad(
3325 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); 3325 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data));
3326 } 3326 }
3327 } 3327 }
3328 3328
3329 } // namespace content 3329 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/npapi/webplugin_impl.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698