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

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

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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
« no previous file with comments | « content/renderer/render_view_impl_unittest.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 14 matching lines...) Expand all
25 #include "third_party/WebKit/public/platform/WebRect.h" 25 #include "third_party/WebKit/public/platform/WebRect.h"
26 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" 26 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
27 #include "third_party/WebKit/public/web/WebPopupType.h" 27 #include "third_party/WebKit/public/web/WebPopupType.h"
28 #include "third_party/WebKit/public/web/WebTextDirection.h" 28 #include "third_party/WebKit/public/web/WebTextDirection.h"
29 #include "third_party/WebKit/public/web/WebTextInputInfo.h" 29 #include "third_party/WebKit/public/web/WebTextInputInfo.h"
30 #include "third_party/WebKit/public/web/WebWidget.h" 30 #include "third_party/WebKit/public/web/WebWidget.h"
31 #include "third_party/WebKit/public/web/WebWidgetClient.h" 31 #include "third_party/WebKit/public/web/WebWidgetClient.h"
32 #include "third_party/skia/include/core/SkBitmap.h" 32 #include "third_party/skia/include/core/SkBitmap.h"
33 #include "ui/base/ime/text_input_mode.h" 33 #include "ui/base/ime/text_input_mode.h"
34 #include "ui/base/ime/text_input_type.h" 34 #include "ui/base/ime/text_input_type.h"
35 #include "ui/base/range/range.h"
36 #include "ui/gfx/native_widget_types.h" 35 #include "ui/gfx/native_widget_types.h"
36 #include "ui/gfx/range/range.h"
37 #include "ui/gfx/rect.h" 37 #include "ui/gfx/rect.h"
38 #include "ui/gfx/vector2d.h" 38 #include "ui/gfx/vector2d.h"
39 #include "ui/gfx/vector2d_f.h" 39 #include "ui/gfx/vector2d_f.h"
40 #include "ui/surface/transport_dib.h" 40 #include "ui/surface/transport_dib.h"
41 #include "webkit/common/cursors/webcursor.h" 41 #include "webkit/common/cursors/webcursor.h"
42 42
43 struct ViewHostMsg_UpdateRect_Params; 43 struct ViewHostMsg_UpdateRect_Params;
44 struct ViewMsg_Resize_Params; 44 struct ViewMsg_Resize_Params;
45 class ViewHostMsg_UpdateRect; 45 class ViewHostMsg_UpdateRect;
46 46
47 namespace IPC { 47 namespace IPC {
48 class SyncMessage; 48 class SyncMessage;
49 } 49 }
50 50
51 namespace WebKit { 51 namespace WebKit {
52 class WebGestureEvent; 52 class WebGestureEvent;
53 class WebInputEvent; 53 class WebInputEvent;
54 class WebKeyboardEvent; 54 class WebKeyboardEvent;
55 class WebMouseEvent; 55 class WebMouseEvent;
56 class WebTouchEvent; 56 class WebTouchEvent;
57 struct WebPoint; 57 struct WebPoint;
58 struct WebRenderingStatsImpl; 58 struct WebRenderingStatsImpl;
59 } 59 }
60 60
61 namespace cc { class OutputSurface; } 61 namespace cc { class OutputSurface; }
62 62
63 namespace ui { 63 namespace gfx {
64 class Range; 64 class Range;
65 } 65 }
66 66
67 namespace content { 67 namespace content {
68 class PepperPluginInstanceImpl; 68 class PepperPluginInstanceImpl;
69 class RenderWidgetCompositor; 69 class RenderWidgetCompositor;
70 class RenderWidgetTest; 70 class RenderWidgetTest;
71 struct GpuRenderingStats; 71 struct GpuRenderingStats;
72 struct WebPluginGeometry; 72 struct WebPluginGeometry;
73 73
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 void OnCreateVideoAck(int32 video_id); 300 void OnCreateVideoAck(int32 video_id);
301 void OnUpdateVideoAck(int32 video_id); 301 void OnUpdateVideoAck(int32 video_id);
302 void OnRequestMoveAck(); 302 void OnRequestMoveAck();
303 void OnSetInputMethodActive(bool is_active); 303 void OnSetInputMethodActive(bool is_active);
304 virtual void OnImeSetComposition( 304 virtual void OnImeSetComposition(
305 const string16& text, 305 const string16& text,
306 const std::vector<WebKit::WebCompositionUnderline>& underlines, 306 const std::vector<WebKit::WebCompositionUnderline>& underlines,
307 int selection_start, 307 int selection_start,
308 int selection_end); 308 int selection_end);
309 virtual void OnImeConfirmComposition(const string16& text, 309 virtual void OnImeConfirmComposition(const string16& text,
310 const ui::Range& replacement_range, 310 const gfx::Range& replacement_range,
311 bool keep_selection); 311 bool keep_selection);
312 void OnPaintAtSize(const TransportDIB::Handle& dib_id, 312 void OnPaintAtSize(const TransportDIB::Handle& dib_id,
313 int tag, 313 int tag,
314 const gfx::Size& page_size, 314 const gfx::Size& page_size,
315 const gfx::Size& desired_size); 315 const gfx::Size& desired_size);
316 void OnRepaint(gfx::Size size_to_paint); 316 void OnRepaint(gfx::Size size_to_paint);
317 void OnSyntheticGestureCompleted(); 317 void OnSyntheticGestureCompleted();
318 void OnSetTextDirection(WebKit::WebTextDirection direction); 318 void OnSetTextDirection(WebKit::WebTextDirection direction);
319 void OnGetFPS(); 319 void OnGetFPS();
320 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, 320 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 // Override point to obtain that the current composition character bounds. 443 // Override point to obtain that the current composition character bounds.
444 // In the case of surrogate pairs, the character is treated as two characters: 444 // In the case of surrogate pairs, the character is treated as two characters:
445 // the bounds for first character is actual one, and the bounds for second 445 // the bounds for first character is actual one, and the bounds for second
446 // character is zero width rectangle. 446 // character is zero width rectangle.
447 virtual void GetCompositionCharacterBounds( 447 virtual void GetCompositionCharacterBounds(
448 std::vector<gfx::Rect>* character_bounds); 448 std::vector<gfx::Rect>* character_bounds);
449 449
450 // Returns the range of the text that is being composed or the selection if 450 // Returns the range of the text that is being composed or the selection if
451 // the composition does not exist. 451 // the composition does not exist.
452 virtual void GetCompositionRange(ui::Range* range); 452 virtual void GetCompositionRange(gfx::Range* range);
453 453
454 // Returns true if the composition range or composition character bounds 454 // Returns true if the composition range or composition character bounds
455 // should be sent to the browser process. 455 // should be sent to the browser process.
456 bool ShouldUpdateCompositionInfo( 456 bool ShouldUpdateCompositionInfo(
457 const ui::Range& range, 457 const gfx::Range& range,
458 const std::vector<gfx::Rect>& bounds); 458 const std::vector<gfx::Rect>& bounds);
459 #endif 459 #endif
460 460
461 // Override point to obtain that the current input method state about 461 // Override point to obtain that the current input method state about
462 // composition text. 462 // composition text.
463 virtual bool CanComposeInline(); 463 virtual bool CanComposeInline();
464 464
465 // Tells the renderer it does not have focus. Used to prevent us from getting 465 // Tells the renderer it does not have focus. Used to prevent us from getting
466 // the focus on our own when the browser did not focus us. 466 // the focus on our own when the browser did not focus us.
467 void ClearFocus(); 467 void ClearFocus();
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 bool can_compose_inline_; 648 bool can_compose_inline_;
649 649
650 // Stores the current selection bounds. 650 // Stores the current selection bounds.
651 gfx::Rect selection_focus_rect_; 651 gfx::Rect selection_focus_rect_;
652 gfx::Rect selection_anchor_rect_; 652 gfx::Rect selection_anchor_rect_;
653 653
654 // Stores the current composition character bounds. 654 // Stores the current composition character bounds.
655 std::vector<gfx::Rect> composition_character_bounds_; 655 std::vector<gfx::Rect> composition_character_bounds_;
656 656
657 // Stores the current composition range. 657 // Stores the current composition range.
658 ui::Range composition_range_; 658 gfx::Range composition_range_;
659 659
660 // The kind of popup this widget represents, NONE if not a popup. 660 // The kind of popup this widget represents, NONE if not a popup.
661 WebKit::WebPopupType popup_type_; 661 WebKit::WebPopupType popup_type_;
662 662
663 // Holds all the needed plugin window moves for a scroll. 663 // Holds all the needed plugin window moves for a scroll.
664 typedef std::vector<WebPluginGeometry> WebPluginGeometryVector; 664 typedef std::vector<WebPluginGeometry> WebPluginGeometryVector;
665 WebPluginGeometryVector plugin_window_moves_; 665 WebPluginGeometryVector plugin_window_moves_;
666 666
667 // A custom background for the widget. 667 // A custom background for the widget.
668 SkBitmap background_; 668 SkBitmap background_;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 #endif 739 #endif
740 740
741 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; 741 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_;
742 742
743 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 743 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
744 }; 744 };
745 745
746 } // namespace content 746 } // namespace content
747 747
748 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 748 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl_unittest.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698