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 #ifndef CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
6 #define CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 6 #define CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason, | 75 virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason, |
76 int notify_id); | 76 int notify_id); |
77 virtual void SetFocus(bool focused); | 77 virtual void SetFocus(bool focused); |
78 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, | 78 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, |
79 WebKit::WebCursorInfo* cursor); | 79 WebKit::WebCursorInfo* cursor); |
80 virtual int GetProcessId(); | 80 virtual int GetProcessId(); |
81 | 81 |
82 // Informs the plugin that its containing content view has gained or lost | 82 // Informs the plugin that its containing content view has gained or lost |
83 // first responder status. | 83 // first responder status. |
84 virtual void SetContentAreaFocus(bool has_focus); | 84 virtual void SetContentAreaFocus(bool has_focus); |
| 85 #if defined(OS_WIN) |
| 86 // Informs the plugin that plugin IME has updated its status. |
| 87 virtual void ImeCompositionUpdated( |
| 88 const string16& text, |
| 89 const std::vector<int>& clauses, |
| 90 const std::vector<int>& target, |
| 91 int cursor_position, |
| 92 int plugin_id); |
| 93 // Informs the plugin that plugin IME has completed. |
| 94 // If |text| is empty, composition was cancelled. |
| 95 virtual void ImeCompositionCompleted(const string16& text, int plugin_id); |
| 96 #endif |
85 #if defined(OS_MACOSX) | 97 #if defined(OS_MACOSX) |
86 // Informs the plugin that its enclosing window has gained or lost focus. | 98 // Informs the plugin that its enclosing window has gained or lost focus. |
87 virtual void SetWindowFocus(bool window_has_focus); | 99 virtual void SetWindowFocus(bool window_has_focus); |
88 // Informs the plugin that its container (window/tab) has changed visibility. | 100 // Informs the plugin that its container (window/tab) has changed visibility. |
89 virtual void SetContainerVisibility(bool is_visible); | 101 virtual void SetContainerVisibility(bool is_visible); |
90 // Informs the plugin that its enclosing window's frame has changed. | 102 // Informs the plugin that its enclosing window's frame has changed. |
91 virtual void WindowFrameChanged(gfx::Rect window_frame, gfx::Rect view_frame); | 103 virtual void WindowFrameChanged(gfx::Rect window_frame, gfx::Rect view_frame); |
92 // Informs the plugin that plugin IME has completed. | 104 // Informs the plugin that plugin IME has completed. |
93 // If |text| is empty, composition was cancelled. | 105 // If |text| is empty, composition was cancelled. |
94 virtual void ImeCompositionCompleted(const string16& text, int plugin_id); | 106 virtual void ImeCompositionCompleted(const string16& text, int plugin_id); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 144 |
133 scoped_ptr<TransportDIB> dib; | 145 scoped_ptr<TransportDIB> dib; |
134 scoped_ptr<skia::PlatformCanvas> canvas; | 146 scoped_ptr<skia::PlatformCanvas> canvas; |
135 }; | 147 }; |
136 | 148 |
137 // Message handlers for messages that proxy WebPlugin methods, which | 149 // Message handlers for messages that proxy WebPlugin methods, which |
138 // we translate into calls to the real WebPlugin. | 150 // we translate into calls to the real WebPlugin. |
139 void OnSetWindow(gfx::PluginWindowHandle window); | 151 void OnSetWindow(gfx::PluginWindowHandle window); |
140 #if defined(OS_WIN) | 152 #if defined(OS_WIN) |
141 void OnSetWindowlessPumpEvent(HANDLE modal_loop_pump_messages_event); | 153 void OnSetWindowlessPumpEvent(HANDLE modal_loop_pump_messages_event); |
| 154 void OnNotifyIMEStatus(const int input_mode, const gfx::Rect& caret_rect); |
142 #endif | 155 #endif |
143 void OnCompleteURL(const std::string& url_in, std::string* url_out, | 156 void OnCompleteURL(const std::string& url_in, std::string* url_out, |
144 bool* result); | 157 bool* result); |
145 void OnHandleURLRequest(const PluginHostMsg_URLRequest_Params& params); | 158 void OnHandleURLRequest(const PluginHostMsg_URLRequest_Params& params); |
146 void OnCancelResource(int id); | 159 void OnCancelResource(int id); |
147 void OnInvalidateRect(const gfx::Rect& rect, bool allow_buffer_flipping); | 160 void OnInvalidateRect(const gfx::Rect& rect, bool allow_buffer_flipping); |
148 void OnGetWindowScriptNPObject(int route_id, bool* success); | 161 void OnGetWindowScriptNPObject(int route_id, bool* success); |
149 void OnResolveProxy(const GURL& url, bool* result, std::string* proxy_list); | 162 void OnResolveProxy(const GURL& url, bool* result, std::string* proxy_list); |
150 void OnGetPluginElement(int route_id, bool* success); | 163 void OnGetPluginElement(int route_id, bool* success); |
151 void OnSetCookie(const GURL& url, | 164 void OnSetCookie(const GURL& url, |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // back-buffer. | 313 // back-buffer. |
301 gfx::Rect front_buffer_diff_; | 314 gfx::Rect front_buffer_diff_; |
302 | 315 |
303 // The url of the main frame hosting the plugin. | 316 // The url of the main frame hosting the plugin. |
304 GURL page_url_; | 317 GURL page_url_; |
305 | 318 |
306 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); | 319 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); |
307 }; | 320 }; |
308 | 321 |
309 #endif // CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 322 #endif // CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
OLD | NEW |