| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" |
| 13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/string16.h" |
| 14 #include "base/task.h" | 16 #include "base/task.h" |
| 15 #include "base/time.h" | 17 #include "base/time.h" |
| 16 #include "content/browser/renderer_host/render_widget_host_view.h" | 18 #include "content/browser/renderer_host/render_widget_host_view.h" |
| 17 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
| 18 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 20 #include "ui/gfx/compositor/compositor_observer.h" | 22 #include "ui/gfx/compositor/compositor_observer.h" |
| 21 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
| 22 #include "views/controls/native/native_view_host.h" | 24 #include "views/controls/native/native_view_host.h" |
| 23 #include "views/events/event.h" | 25 #include "views/events/event.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 virtual void InsertText(const string16& text) OVERRIDE; | 172 virtual void InsertText(const string16& text) OVERRIDE; |
| 171 virtual void InsertChar(char16 ch, int flags) OVERRIDE; | 173 virtual void InsertChar(char16 ch, int flags) OVERRIDE; |
| 172 virtual ui::TextInputType GetTextInputType() const OVERRIDE; | 174 virtual ui::TextInputType GetTextInputType() const OVERRIDE; |
| 173 virtual gfx::Rect GetCaretBounds() OVERRIDE; | 175 virtual gfx::Rect GetCaretBounds() OVERRIDE; |
| 174 virtual bool HasCompositionText() OVERRIDE; | 176 virtual bool HasCompositionText() OVERRIDE; |
| 175 virtual bool GetTextRange(ui::Range* range) OVERRIDE; | 177 virtual bool GetTextRange(ui::Range* range) OVERRIDE; |
| 176 virtual bool GetCompositionTextRange(ui::Range* range) OVERRIDE; | 178 virtual bool GetCompositionTextRange(ui::Range* range) OVERRIDE; |
| 177 virtual bool GetSelectionRange(ui::Range* range) OVERRIDE; | 179 virtual bool GetSelectionRange(ui::Range* range) OVERRIDE; |
| 178 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE; | 180 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE; |
| 179 virtual bool DeleteRange(const ui::Range& range) OVERRIDE; | 181 virtual bool DeleteRange(const ui::Range& range) OVERRIDE; |
| 180 virtual bool GetTextFromRange( | 182 virtual bool GetTextFromRange(const ui::Range& range, |
| 181 const ui::Range& range, | 183 string16* text) OVERRIDE; |
| 182 const base::Callback<void(const string16&)>& callback) OVERRIDE; | |
| 183 virtual void OnInputMethodChanged() OVERRIDE; | 184 virtual void OnInputMethodChanged() OVERRIDE; |
| 184 virtual bool ChangeTextDirectionAndLayoutAlignment( | 185 virtual bool ChangeTextDirectionAndLayoutAlignment( |
| 185 base::i18n::TextDirection direction) OVERRIDE; | 186 base::i18n::TextDirection direction) OVERRIDE; |
| 186 virtual views::View* GetOwnerViewOfTextInputClient() OVERRIDE; | 187 virtual views::View* GetOwnerViewOfTextInputClient() OVERRIDE; |
| 187 | 188 |
| 188 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 189 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 189 virtual void AcceleratedSurfaceNew( | 190 virtual void AcceleratedSurfaceNew( |
| 190 int32 width, | 191 int32 width, |
| 191 int32 height, | 192 int32 height, |
| 192 uint64* surface_id, | 193 uint64* surface_id, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 gfx::Size requested_size_; | 284 gfx::Size requested_size_; |
| 284 | 285 |
| 285 // The touch-event. Its touch-points are updated as necessary. A new | 286 // The touch-event. Its touch-points are updated as necessary. A new |
| 286 // touch-point is added from an ET_TOUCH_PRESSED event, and a touch-point is | 287 // touch-point is added from an ET_TOUCH_PRESSED event, and a touch-point is |
| 287 // removed from the list on an ET_TOUCH_RELEASED event. | 288 // removed from the list on an ET_TOUCH_RELEASED event. |
| 288 WebKit::WebTouchEvent touch_event_; | 289 WebKit::WebTouchEvent touch_event_; |
| 289 | 290 |
| 290 // The current text input type. | 291 // The current text input type. |
| 291 ui::TextInputType text_input_type_; | 292 ui::TextInputType text_input_type_; |
| 292 | 293 |
| 293 string16 selection_text_; | 294 // Rectangles before and after the selection. |
| 294 size_t selection_text_offset_; | |
| 295 ui::Range selection_range_; | |
| 296 gfx::Rect selection_start_rect_; | 295 gfx::Rect selection_start_rect_; |
| 297 gfx::Rect selection_end_rect_; | 296 gfx::Rect selection_end_rect_; |
| 298 | 297 |
| 299 // Indicates if there is onging composition text. | 298 // Indicates if there is onging composition text. |
| 300 bool has_composition_text_; | 299 bool has_composition_text_; |
| 301 | 300 |
| 302 string16 tooltip_text_; | 301 string16 tooltip_text_; |
| 303 | 302 |
| 304 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 303 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 305 std::vector< base::Callback<void(void)> > on_compositing_ended_callbacks_; | 304 std::vector< base::Callback<void(void)> > on_compositing_ended_callbacks_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 317 | 316 |
| 318 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 317 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 319 std::map<uint64, scoped_refptr<AcceleratedSurfaceContainerLinux> > | 318 std::map<uint64, scoped_refptr<AcceleratedSurfaceContainerLinux> > |
| 320 accelerated_surface_containers_; | 319 accelerated_surface_containers_; |
| 321 #endif | 320 #endif |
| 322 | 321 |
| 323 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewViews); | 322 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewViews); |
| 324 }; | 323 }; |
| 325 | 324 |
| 326 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ | 325 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ |
| OLD | NEW |