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

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

Issue 7041003: Show composition text on IME panel when Pepper plugin is focused (Linux). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added DCHECK for keep Chromium and WebKit types in sync. Created 9 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 | Annotate | Revision Log
OLDNEW
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_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "content/renderer/paint_aggregator.h" 15 #include "content/renderer/paint_aggregator.h"
16 #include "ipc/ipc_channel.h" 16 #include "ipc/ipc_channel.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidgetClient.h" 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidgetClient.h"
23 #include "third_party/skia/include/core/SkBitmap.h" 22 #include "third_party/skia/include/core/SkBitmap.h"
23 #include "ui/base/ime/text_input_type.h"
24 #include "ui/gfx/native_widget_types.h" 24 #include "ui/gfx/native_widget_types.h"
25 #include "ui/gfx/rect.h" 25 #include "ui/gfx/rect.h"
26 #include "ui/gfx/size.h" 26 #include "ui/gfx/size.h"
27 #include "ui/gfx/surface/transport_dib.h" 27 #include "ui/gfx/surface/transport_dib.h"
28 #include "webkit/glue/webcursor.h" 28 #include "webkit/glue/webcursor.h"
29 29
30 class RenderThreadBase; 30 class RenderThreadBase;
31 31
32 namespace gfx { 32 namespace gfx {
33 class Point; 33 class Point;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 void set_next_paint_is_resize_ack(); 271 void set_next_paint_is_resize_ack();
272 void set_next_paint_is_restore_ack(); 272 void set_next_paint_is_restore_ack();
273 void set_next_paint_is_repaint_ack(); 273 void set_next_paint_is_repaint_ack();
274 274
275 // Checks if the input method state and caret position have been changed. 275 // Checks if the input method state and caret position have been changed.
276 // If they are changed, the new value will be sent to the browser process. 276 // If they are changed, the new value will be sent to the browser process.
277 void UpdateInputMethod(); 277 void UpdateInputMethod();
278 278
279 // Override point to obtain that the current input method state and caret 279 // Override point to obtain that the current input method state and caret
280 // position. 280 // position.
281 virtual WebKit::WebTextInputType GetTextInputType(); 281 virtual ui::TextInputType GetTextInputType();
282
283 // Override point to obtain that the current input method state about
284 // composition text.
285 virtual bool CanComposeInline();
282 286
283 // Tells the renderer it does not have focus. Used to prevent us from getting 287 // Tells the renderer it does not have focus. Used to prevent us from getting
284 // the focus on our own when the browser did not focus us. 288 // the focus on our own when the browser did not focus us.
285 void ClearFocus(); 289 void ClearFocus();
286 290
287 // Set the pending window rect. 291 // Set the pending window rect.
288 // Because the real render_widget is hosted in another process, there is 292 // Because the real render_widget is hosted in another process, there is
289 // a time period where we may have set a new window rect which has not yet 293 // a time period where we may have set a new window rect which has not yet
290 // been processed by the browser. So we maintain a pending window rect 294 // been processed by the browser. So we maintain a pending window rect
291 // size. If JS code sets the WindowRect, and then immediately calls 295 // size. If JS code sets the WindowRect, and then immediately calls
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 394
391 // Whether this RenderWidget is currently swapped out, such that the view is 395 // Whether this RenderWidget is currently swapped out, such that the view is
392 // being rendered by another process. If all RenderWidgets in a process are 396 // being rendered by another process. If all RenderWidgets in a process are
393 // swapped out, the process can exit. 397 // swapped out, the process can exit.
394 bool is_swapped_out_; 398 bool is_swapped_out_;
395 399
396 // Indicates if an input method is active in the browser process. 400 // Indicates if an input method is active in the browser process.
397 bool input_method_is_active_; 401 bool input_method_is_active_;
398 402
399 // Stores the current text input type of |webwidget_|. 403 // Stores the current text input type of |webwidget_|.
400 WebKit::WebTextInputType text_input_type_; 404 ui::TextInputType text_input_type_;
405
406 // Stores the current type of composition text rendering of |webwidget_|.
407 bool can_compose_inline_;
401 408
402 // Stores the current caret bounds of input focus. 409 // Stores the current caret bounds of input focus.
403 WebKit::WebRect caret_bounds_; 410 WebKit::WebRect caret_bounds_;
404 411
405 // The kind of popup this widget represents, NONE if not a popup. 412 // The kind of popup this widget represents, NONE if not a popup.
406 WebKit::WebPopupType popup_type_; 413 WebKit::WebPopupType popup_type_;
407 414
408 // Holds all the needed plugin window moves for a scroll. 415 // Holds all the needed plugin window moves for a scroll.
409 typedef std::vector<webkit::npapi::WebPluginGeometry> WebPluginGeometryVector; 416 typedef std::vector<webkit::npapi::WebPluginGeometry> WebPluginGeometryVector;
410 WebPluginGeometryVector plugin_window_moves_; 417 WebPluginGeometryVector plugin_window_moves_;
(...skipping 24 matching lines...) Expand all
435 bool animation_task_posted_; 442 bool animation_task_posted_;
436 bool invalidation_task_posted_; 443 bool invalidation_task_posted_;
437 444
438 bool has_disable_gpu_vsync_switch_; 445 bool has_disable_gpu_vsync_switch_;
439 base::TimeTicks last_do_deferred_update_time_; 446 base::TimeTicks last_do_deferred_update_time_;
440 447
441 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 448 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
442 }; 449 };
443 450
444 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 451 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698