OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_fullscreen_pepper.h" | 5 #include "content/renderer/render_widget_fullscreen_pepper.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "chrome/renderer/render_thread.h" | 8 #include "chrome/renderer/render_thread.h" |
9 #include "content/renderer/renderer_gl_context.h" | 9 #include "content/renderer/renderer_gl_context.h" |
10 #include "content/renderer/gpu_channel_host.h" | 10 #include "content/renderer/gpu_channel_host.h" |
11 #include "content/renderer/pepper_platform_context_3d_impl.h" | 11 #include "content/renderer/pepper_platform_context_3d_impl.h" |
12 #include "content/common/view_messages.h" | 12 #include "content/common/view_messages.h" |
13 #include "gpu/command_buffer/client/gles2_implementation.h" | 13 #include "gpu/command_buffer/client/gles2_implementation.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h" |
17 #include "webkit/plugins/ppapi/plugin_delegate.h" | 18 #include "webkit/plugins/ppapi/plugin_delegate.h" |
18 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 19 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
19 | 20 |
20 using WebKit::WebCanvas; | 21 using WebKit::WebCanvas; |
21 using WebKit::WebCompositionUnderline; | 22 using WebKit::WebCompositionUnderline; |
22 using WebKit::WebCursorInfo; | 23 using WebKit::WebCursorInfo; |
23 using WebKit::WebInputEvent; | 24 using WebKit::WebInputEvent; |
| 25 using WebKit::WebRange; |
24 using WebKit::WebRect; | 26 using WebKit::WebRect; |
25 using WebKit::WebSize; | 27 using WebKit::WebSize; |
26 using WebKit::WebString; | 28 using WebKit::WebString; |
27 using WebKit::WebTextDirection; | 29 using WebKit::WebTextDirection; |
28 using WebKit::WebTextInputType; | 30 using WebKit::WebTextInputType; |
29 using WebKit::WebVector; | 31 using WebKit::WebVector; |
30 using WebKit::WebWidget; | 32 using WebKit::WebWidget; |
31 | 33 |
32 namespace { | 34 namespace { |
33 | 35 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 } | 106 } |
105 | 107 |
106 virtual bool confirmComposition() { | 108 virtual bool confirmComposition() { |
107 return false; | 109 return false; |
108 } | 110 } |
109 | 111 |
110 virtual bool confirmComposition(const WebString& text) { | 112 virtual bool confirmComposition(const WebString& text) { |
111 return false; | 113 return false; |
112 } | 114 } |
113 | 115 |
| 116 virtual bool compositionRange(size_t* location, size_t* length) { |
| 117 *location = 0; |
| 118 *length = 0; |
| 119 NOTIMPLEMENTED(); |
| 120 return false; |
| 121 } |
| 122 |
114 virtual WebTextInputType textInputType() { | 123 virtual WebTextInputType textInputType() { |
115 return WebKit::WebTextInputTypeNone; | 124 return WebKit::WebTextInputTypeNone; |
116 } | 125 } |
117 | 126 |
118 virtual WebRect caretOrSelectionBounds() { | 127 virtual WebRect caretOrSelectionBounds() { |
119 return WebRect(); | 128 return WebRect(); |
120 } | 129 } |
121 | 130 |
| 131 virtual bool caretOrSelectionRange(size_t* location, size_t* length) { |
| 132 *location = 0; |
| 133 *length = 0; |
| 134 NOTIMPLEMENTED(); |
| 135 return false; |
| 136 } |
| 137 |
122 virtual void setTextDirection(WebTextDirection) { | 138 virtual void setTextDirection(WebTextDirection) { |
123 } | 139 } |
124 | 140 |
125 virtual bool isAcceleratedCompositingActive() const { | 141 virtual bool isAcceleratedCompositingActive() const { |
126 return widget_->context() && (plugin_->GetBackingTextureId() != 0); | 142 return widget_->context() && (plugin_->GetBackingTextureId() != 0); |
127 } | 143 } |
128 | 144 |
129 private: | 145 private: |
130 scoped_refptr<webkit::ppapi::PluginInstance> plugin_; | 146 scoped_refptr<webkit::ppapi::PluginInstance> plugin_; |
131 RenderWidgetFullscreenPepper* widget_; | 147 RenderWidgetFullscreenPepper* widget_; |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 // Destroy the context later, in case we got called from InitContext for | 422 // Destroy the context later, in case we got called from InitContext for |
407 // example. We still need to reset context_ now so that a new context gets | 423 // example. We still need to reset context_ now so that a new context gets |
408 // created when the plugin recreates its own. | 424 // created when the plugin recreates its own. |
409 MessageLoop::current()->PostTask( | 425 MessageLoop::current()->PostTask( |
410 FROM_HERE, | 426 FROM_HERE, |
411 NewRunnableFunction(DestroyContext, context_, program_, buffer_)); | 427 NewRunnableFunction(DestroyContext, context_, program_, buffer_)); |
412 context_ = NULL; | 428 context_ = NULL; |
413 program_ = 0; | 429 program_ = 0; |
414 buffer_ = 0; | 430 buffer_ = 0; |
415 } | 431 } |
OLD | NEW |