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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "views/events/event.h" | 23 #include "views/events/event.h" |
24 #include "views/ime/text_input_client.h" | 24 #include "views/ime/text_input_client.h" |
25 #include "views/touchui/touch_selection_controller.h" | 25 #include "views/touchui/touch_selection_controller.h" |
26 #include "views/view.h" | 26 #include "views/view.h" |
27 #include "webkit/glue/webcursor.h" | 27 #include "webkit/glue/webcursor.h" |
28 | 28 |
29 #if defined(TOUCH_UI) | 29 #if defined(TOUCH_UI) |
30 namespace ui { | 30 namespace ui { |
31 enum TouchStatus; | 31 enum TouchStatus; |
32 } | 32 } |
| 33 #endif |
| 34 |
| 35 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
33 class AcceleratedSurfaceContainerTouch; | 36 class AcceleratedSurfaceContainerTouch; |
34 #endif | 37 #endif |
35 | 38 |
36 class RenderWidgetHost; | 39 class RenderWidgetHost; |
37 struct NativeWebKeyboardEvent; | 40 struct NativeWebKeyboardEvent; |
38 | 41 |
39 // ----------------------------------------------------------------------------- | 42 // ----------------------------------------------------------------------------- |
40 // See comments in render_widget_host_view.h about this class and its members. | 43 // See comments in render_widget_host_view.h about this class and its members. |
41 // ----------------------------------------------------------------------------- | 44 // ----------------------------------------------------------------------------- |
42 class RenderWidgetHostViewViews : public RenderWidgetHostView, | 45 class RenderWidgetHostViewViews : public RenderWidgetHostView, |
43 #if defined(TOUCH_UI) | 46 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
44 public ui::CompositorObserver, | 47 public ui::CompositorObserver, |
45 #endif | 48 #endif |
46 public views::TouchSelectionClientView, | 49 public views::TouchSelectionClientView, |
47 public views::TextInputClient, | 50 public views::TextInputClient, |
48 public NotificationObserver { | 51 public NotificationObserver { |
49 public: | 52 public: |
50 // Internal class name. | 53 // Internal class name. |
51 static const char kViewClassName[]; | 54 static const char kViewClassName[]; |
52 | 55 |
53 explicit RenderWidgetHostViewViews(RenderWidgetHost* widget); | 56 explicit RenderWidgetHostViewViews(RenderWidgetHost* widget); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE; | 177 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE; |
175 virtual bool DeleteRange(const ui::Range& range) OVERRIDE; | 178 virtual bool DeleteRange(const ui::Range& range) OVERRIDE; |
176 virtual bool GetTextFromRange( | 179 virtual bool GetTextFromRange( |
177 const ui::Range& range, | 180 const ui::Range& range, |
178 const base::Callback<void(const string16&)>& callback) OVERRIDE; | 181 const base::Callback<void(const string16&)>& callback) OVERRIDE; |
179 virtual void OnInputMethodChanged() OVERRIDE; | 182 virtual void OnInputMethodChanged() OVERRIDE; |
180 virtual bool ChangeTextDirectionAndLayoutAlignment( | 183 virtual bool ChangeTextDirectionAndLayoutAlignment( |
181 base::i18n::TextDirection direction) OVERRIDE; | 184 base::i18n::TextDirection direction) OVERRIDE; |
182 virtual views::View* GetOwnerViewOfTextInputClient() OVERRIDE; | 185 virtual views::View* GetOwnerViewOfTextInputClient() OVERRIDE; |
183 | 186 |
184 #if defined(TOUCH_UI) | 187 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
185 virtual void AcceleratedSurfaceNew( | 188 virtual void AcceleratedSurfaceNew( |
186 int32 width, | 189 int32 width, |
187 int32 height, | 190 int32 height, |
188 uint64* surface_id, | 191 uint64* surface_id, |
189 TransportDIB::Handle* surface_handle) OVERRIDE; | 192 TransportDIB::Handle* surface_handle) OVERRIDE; |
190 virtual void AcceleratedSurfaceBuffersSwapped( | 193 virtual void AcceleratedSurfaceBuffersSwapped( |
191 uint64 surface_id, | 194 uint64 surface_id, |
192 int32 route_id, | 195 int32 route_id, |
193 int gpu_host_id) OVERRIDE; | 196 int gpu_host_id) OVERRIDE; |
194 virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE; | 197 virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 ui::TextInputType text_input_type_; | 290 ui::TextInputType text_input_type_; |
288 | 291 |
289 // The current caret bounds. | 292 // The current caret bounds. |
290 gfx::Rect caret_bounds_; | 293 gfx::Rect caret_bounds_; |
291 | 294 |
292 // Indicates if there is onging composition text. | 295 // Indicates if there is onging composition text. |
293 bool has_composition_text_; | 296 bool has_composition_text_; |
294 | 297 |
295 string16 tooltip_text_; | 298 string16 tooltip_text_; |
296 | 299 |
297 #if defined(TOUCH_UI) | 300 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
298 std::vector< base::Callback<void(void)> > on_compositing_ended_callbacks_; | 301 std::vector< base::Callback<void(void)> > on_compositing_ended_callbacks_; |
299 #endif | 302 #endif |
300 | 303 |
301 scoped_ptr<views::TouchSelectionController> touch_selection_controller_; | 304 scoped_ptr<views::TouchSelectionController> touch_selection_controller_; |
302 gfx::Point selection_start_; | 305 gfx::Point selection_start_; |
303 gfx::Point selection_end_; | 306 gfx::Point selection_end_; |
304 ScopedRunnableMethodFactory<RenderWidgetHostViewViews> | 307 ScopedRunnableMethodFactory<RenderWidgetHostViewViews> |
305 update_touch_selection_; | 308 update_touch_selection_; |
306 | 309 |
307 #if defined(TOUCH_UI) | 310 #if defined(TOUCH_UI) |
308 // used to register for keyboard visiblity notificatons. | 311 // used to register for keyboard visiblity notificatons. |
309 NotificationRegistrar registrar_; | 312 NotificationRegistrar registrar_; |
310 gfx::Rect keyboard_rect_; | 313 gfx::Rect keyboard_rect_; |
| 314 #endif |
| 315 |
| 316 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
311 std::map<uint64, scoped_refptr<AcceleratedSurfaceContainerTouch> > | 317 std::map<uint64, scoped_refptr<AcceleratedSurfaceContainerTouch> > |
312 accelerated_surface_containers_; | 318 accelerated_surface_containers_; |
313 #endif | 319 #endif |
314 | 320 |
315 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewViews); | 321 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewViews); |
316 }; | 322 }; |
317 | 323 |
318 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ | 324 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ |
OLD | NEW |