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

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 317163002: Moving compositor_bindings from webkit to content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moving assert_matching_enum from content/publi/common to content/common Created 6 years, 6 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
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/layers/texture_layer.h" 20 #include "cc/layers/texture_layer.h"
21 #include "cc/trees/layer_tree_host.h" 21 #include "cc/trees/layer_tree_host.h"
22 #include "content/common/content_constants_internal.h" 22 #include "content/common/content_constants_internal.h"
23 #include "content/common/input/web_input_event_traits.h" 23 #include "content/common/input/web_input_event_traits.h"
24 #include "content/public/common/content_switches.h" 24 #include "content/public/common/content_switches.h"
25 #include "content/public/common/page_zoom.h" 25 #include "content/public/common/page_zoom.h"
26 #include "content/public/renderer/content_renderer_client.h" 26 #include "content/public/renderer/content_renderer_client.h"
27 #include "content/renderer/compositor_bindings/web_layer_impl.h"
27 #include "content/renderer/gpu/render_widget_compositor.h" 28 #include "content/renderer/gpu/render_widget_compositor.h"
28 #include "content/renderer/pepper/common.h" 29 #include "content/renderer/pepper/common.h"
29 #include "content/renderer/pepper/content_decryptor_delegate.h" 30 #include "content/renderer/pepper/content_decryptor_delegate.h"
30 #include "content/renderer/pepper/event_conversion.h" 31 #include "content/renderer/pepper/event_conversion.h"
31 #include "content/renderer/pepper/fullscreen_container.h" 32 #include "content/renderer/pepper/fullscreen_container.h"
32 #include "content/renderer/pepper/gfx_conversion.h" 33 #include "content/renderer/pepper/gfx_conversion.h"
33 #include "content/renderer/pepper/host_dispatcher_wrapper.h" 34 #include "content/renderer/pepper/host_dispatcher_wrapper.h"
34 #include "content/renderer/pepper/host_globals.h" 35 #include "content/renderer/pepper/host_globals.h"
35 #include "content/renderer/pepper/message_channel.h" 36 #include "content/renderer/pepper/message_channel.h"
36 #include "content/renderer/pepper/npapi_glue.h" 37 #include "content/renderer/pepper/npapi_glue.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 #include "third_party/WebKit/public/web/WebView.h" 119 #include "third_party/WebKit/public/web/WebView.h"
119 #include "third_party/khronos/GLES2/gl2.h" 120 #include "third_party/khronos/GLES2/gl2.h"
120 #include "third_party/skia/include/core/SkCanvas.h" 121 #include "third_party/skia/include/core/SkCanvas.h"
121 #include "third_party/skia/include/core/SkRect.h" 122 #include "third_party/skia/include/core/SkRect.h"
122 #include "ui/gfx/image/image_skia.h" 123 #include "ui/gfx/image/image_skia.h"
123 #include "ui/gfx/image/image_skia_rep.h" 124 #include "ui/gfx/image/image_skia_rep.h"
124 #include "ui/gfx/range/range.h" 125 #include "ui/gfx/range/range.h"
125 #include "ui/gfx/rect_conversions.h" 126 #include "ui/gfx/rect_conversions.h"
126 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" 127 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
127 #include "v8/include/v8.h" 128 #include "v8/include/v8.h"
128 #include "webkit/renderer/compositor_bindings/web_layer_impl.h"
129 129
130 #if defined(OS_CHROMEOS) 130 #if defined(OS_CHROMEOS)
131 #include "ui/events/keycodes/keyboard_codes_posix.h" 131 #include "ui/events/keycodes/keyboard_codes_posix.h"
132 #endif 132 #endif
133 133
134 #if defined(OS_MACOSX) 134 #if defined(OS_MACOSX)
135 #include "printing/metafile_impl.h" 135 #include "printing/metafile_impl.h"
136 #endif // defined(OS_MACOSX) 136 #endif // defined(OS_MACOSX)
137 137
138 #if defined(OS_WIN) 138 #if defined(OS_WIN)
(...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 opaque = bound_graphics_3d_->IsOpaque(); 2010 opaque = bound_graphics_3d_->IsOpaque();
2011 texture_layer_->SetTextureMailboxWithoutReleaseCallback( 2011 texture_layer_->SetTextureMailboxWithoutReleaseCallback(
2012 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point)); 2012 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point));
2013 } else { 2013 } else {
2014 DCHECK(bound_graphics_2d_platform_); 2014 DCHECK(bound_graphics_2d_platform_);
2015 texture_layer_ = cc::TextureLayer::CreateForMailbox(this); 2015 texture_layer_ = cc::TextureLayer::CreateForMailbox(this);
2016 bound_graphics_2d_platform_->AttachedToNewLayer(); 2016 bound_graphics_2d_platform_->AttachedToNewLayer();
2017 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque(); 2017 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque();
2018 texture_layer_->SetFlipped(false); 2018 texture_layer_->SetFlipped(false);
2019 } 2019 }
2020 web_layer_.reset(new webkit::WebLayerImpl(texture_layer_)); 2020 web_layer_.reset(new WebLayerImpl(texture_layer_));
2021 if (fullscreen_container_) { 2021 if (fullscreen_container_) {
2022 fullscreen_container_->SetLayer(web_layer_.get()); 2022 fullscreen_container_->SetLayer(web_layer_.get());
2023 // Ignore transparency in fullscreen, since that's what Flash always 2023 // Ignore transparency in fullscreen, since that's what Flash always
2024 // wants to do, and that lets it not recreate a context if 2024 // wants to do, and that lets it not recreate a context if
2025 // wmode=transparent was specified. 2025 // wmode=transparent was specified.
2026 texture_layer_->SetContentsOpaque(true); 2026 texture_layer_->SetContentsOpaque(true);
2027 } else { 2027 } else {
2028 container_->setWebLayer(web_layer_.get()); 2028 container_->setWebLayer(web_layer_.get());
2029 texture_layer_->SetContentsOpaque(opaque); 2029 texture_layer_->SetContentsOpaque(opaque);
2030 } 2030 }
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
3214 // Running out-of-process. Initiate an IPC call to notify the plugin 3214 // Running out-of-process. Initiate an IPC call to notify the plugin
3215 // process. 3215 // process.
3216 ppapi::proxy::HostDispatcher* dispatcher = 3216 ppapi::proxy::HostDispatcher* dispatcher =
3217 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); 3217 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance());
3218 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( 3218 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad(
3219 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); 3219 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data));
3220 } 3220 }
3221 } 3221 }
3222 3222
3223 } // namespace content 3223 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698