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

Side by Side Diff: content/renderer/render_widget.cc

Issue 19761007: Move NPAPI implementation out of webkit/plugins/npapi and into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 7 years, 5 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/render_widget.h" 5 #include "content/renderer/render_widget.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/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "cc/base/switches.h" 18 #include "cc/base/switches.h"
19 #include "cc/output/output_surface.h" 19 #include "cc/output/output_surface.h"
20 #include "cc/trees/layer_tree_host.h" 20 #include "cc/trees/layer_tree_host.h"
21 #include "content/child/npapi/webplugin.h"
21 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 22 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
22 #include "content/common/input_messages.h" 23 #include "content/common/input_messages.h"
23 #include "content/common/swapped_out_messages.h" 24 #include "content/common/swapped_out_messages.h"
24 #include "content/common/view_messages.h" 25 #include "content/common/view_messages.h"
25 #include "content/public/common/content_switches.h" 26 #include "content/public/common/content_switches.h"
26 #include "content/renderer/gpu/compositor_output_surface.h" 27 #include "content/renderer/gpu/compositor_output_surface.h"
27 #include "content/renderer/gpu/compositor_software_output_device.h" 28 #include "content/renderer/gpu/compositor_software_output_device.h"
28 #include "content/renderer/gpu/delegated_compositor_output_surface.h" 29 #include "content/renderer/gpu/delegated_compositor_output_surface.h"
29 #include "content/renderer/gpu/input_handler_manager.h" 30 #include "content/renderer/gpu/input_handler_manager.h"
30 #include "content/renderer/gpu/mailbox_output_surface.h" 31 #include "content/renderer/gpu/mailbox_output_surface.h"
(...skipping 19 matching lines...) Expand all
50 #include "third_party/WebKit/public/web/WebScreenInfo.h" 51 #include "third_party/WebKit/public/web/WebScreenInfo.h"
51 #include "third_party/skia/include/core/SkShader.h" 52 #include "third_party/skia/include/core/SkShader.h"
52 #include "ui/base/ui_base_switches.h" 53 #include "ui/base/ui_base_switches.h"
53 #include "ui/gfx/point.h" 54 #include "ui/gfx/point.h"
54 #include "ui/gfx/rect_conversions.h" 55 #include "ui/gfx/rect_conversions.h"
55 #include "ui/gfx/size_conversions.h" 56 #include "ui/gfx/size_conversions.h"
56 #include "ui/gfx/skia_util.h" 57 #include "ui/gfx/skia_util.h"
57 #include "ui/gl/gl_switches.h" 58 #include "ui/gl/gl_switches.h"
58 #include "ui/surface/transport_dib.h" 59 #include "ui/surface/transport_dib.h"
59 #include "webkit/glue/webkit_glue.h" 60 #include "webkit/glue/webkit_glue.h"
60 #include "webkit/plugins/npapi/webplugin.h"
61 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 61 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
62 #include "webkit/renderer/compositor_bindings/web_rendering_stats_impl.h" 62 #include "webkit/renderer/compositor_bindings/web_rendering_stats_impl.h"
63 #include "webkit/renderer/cursor_utils.h" 63 #include "webkit/renderer/cursor_utils.h"
64 64
65 #if defined(OS_ANDROID) 65 #if defined(OS_ANDROID)
66 #include "content/renderer/android/synchronous_compositor_factory.h" 66 #include "content/renderer/android/synchronous_compositor_factory.h"
67 #endif 67 #endif
68 68
69 #if defined(OS_POSIX) 69 #if defined(OS_POSIX)
70 #include "ipc/ipc_channel_posix.h" 70 #include "ipc/ipc_channel_posix.h"
(...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2357 #if defined(OS_ANDROID) 2357 #if defined(OS_ANDROID)
2358 if (event_cancelled) 2358 if (event_cancelled)
2359 return; 2359 return;
2360 if (event.type == WebInputEvent::GestureTap || 2360 if (event.type == WebInputEvent::GestureTap ||
2361 event.type == WebInputEvent::GestureLongPress) { 2361 event.type == WebInputEvent::GestureLongPress) {
2362 UpdateTextInputState(SHOW_IME_IF_NEEDED); 2362 UpdateTextInputState(SHOW_IME_IF_NEEDED);
2363 } 2363 }
2364 #endif 2364 #endif
2365 } 2365 }
2366 2366
2367 void RenderWidget::SchedulePluginMove( 2367 void RenderWidget::SchedulePluginMove(const WebPluginGeometry& move) {
2368 const webkit::npapi::WebPluginGeometry& move) {
2369 size_t i = 0; 2368 size_t i = 0;
2370 for (; i < plugin_window_moves_.size(); ++i) { 2369 for (; i < plugin_window_moves_.size(); ++i) {
2371 if (plugin_window_moves_[i].window == move.window) { 2370 if (plugin_window_moves_[i].window == move.window) {
2372 if (move.rects_valid) { 2371 if (move.rects_valid) {
2373 plugin_window_moves_[i] = move; 2372 plugin_window_moves_[i] = move;
2374 } else { 2373 } else {
2375 plugin_window_moves_[i].visible = move.visible; 2374 plugin_window_moves_[i].visible = move.visible;
2376 } 2375 }
2377 break; 2376 break;
2378 } 2377 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
2480 2479
2481 if (!context->InitializeWithDefaultBufferSizes( 2480 if (!context->InitializeWithDefaultBufferSizes(
2482 attributes, 2481 attributes,
2483 false /* bind generates resources */, 2482 false /* bind generates resources */,
2484 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) 2483 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) )
2485 return NULL; 2484 return NULL;
2486 return context.release(); 2485 return context.release();
2487 } 2486 }
2488 2487
2489 } // namespace content 2488 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698