OLD | NEW |
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/ppb_graphics_3d_impl.h" | 5 #include "content/renderer/pepper/ppb_graphics_3d_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/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "content/public/common/content_switches.h" | 11 #include "content/public/common/content_switches.h" |
| 12 #include "content/public/common/webpreferences.h" |
12 #include "content/renderer/pepper/host_globals.h" | 13 #include "content/renderer/pepper/host_globals.h" |
13 #include "content/renderer/pepper/pepper_platform_context_3d.h" | 14 #include "content/renderer/pepper/pepper_platform_context_3d.h" |
14 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 15 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
15 #include "content/renderer/pepper/plugin_module.h" | 16 #include "content/renderer/pepper/plugin_module.h" |
16 #include "content/renderer/render_view_impl.h" | 17 #include "content/renderer/render_view_impl.h" |
17 #include "gpu/command_buffer/client/gles2_implementation.h" | 18 #include "gpu/command_buffer/client/gles2_implementation.h" |
18 #include "ppapi/c/ppp_graphics_3d.h" | 19 #include "ppapi/c/ppp_graphics_3d.h" |
19 #include "ppapi/thunk/enter.h" | 20 #include "ppapi/thunk/enter.h" |
20 #include "third_party/WebKit/public/platform/WebString.h" | 21 #include "third_party/WebKit/public/platform/WebString.h" |
21 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 22 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
22 #include "third_party/WebKit/public/web/WebDocument.h" | 23 #include "third_party/WebKit/public/web/WebDocument.h" |
23 #include "third_party/WebKit/public/web/WebElement.h" | 24 #include "third_party/WebKit/public/web/WebElement.h" |
24 #include "third_party/WebKit/public/web/WebFrame.h" | 25 #include "third_party/WebKit/public/web/WebFrame.h" |
25 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 26 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
26 #include "webkit/common/webpreferences.h" | |
27 | 27 |
28 using ppapi::thunk::EnterResourceNoLock; | 28 using ppapi::thunk::EnterResourceNoLock; |
29 using ppapi::thunk::PPB_Graphics3D_API; | 29 using ppapi::thunk::PPB_Graphics3D_API; |
30 using blink::WebConsoleMessage; | 30 using blink::WebConsoleMessage; |
31 using blink::WebFrame; | 31 using blink::WebFrame; |
32 using blink::WebPluginContainer; | 32 using blink::WebPluginContainer; |
33 using blink::WebString; | 33 using blink::WebString; |
34 | 34 |
35 namespace content { | 35 namespace content { |
36 | 36 |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 PPP_GRAPHICS_3D_INTERFACE)); | 327 PPP_GRAPHICS_3D_INTERFACE)); |
328 // We have to check *again* that the instance exists, because it could have | 328 // We have to check *again* that the instance exists, because it could have |
329 // been deleted during GetPluginInterface(). Even the PluginModule could be | 329 // been deleted during GetPluginInterface(). Even the PluginModule could be |
330 // deleted, but in that case, the instance should also be gone, so the | 330 // deleted, but in that case, the instance should also be gone, so the |
331 // GetInstance check covers both cases. | 331 // GetInstance check covers both cases. |
332 if (ppp_graphics_3d && HostGlobals::Get()->GetInstance(this_pp_instance)) | 332 if (ppp_graphics_3d && HostGlobals::Get()->GetInstance(this_pp_instance)) |
333 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance); | 333 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance); |
334 } | 334 } |
335 | 335 |
336 } // namespace content | 336 } // namespace content |
OLD | NEW |