OLD | NEW |
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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "content/browser/renderer_host/image_transport_factory.h" | 16 #include "content/browser/renderer_host/image_transport_factory.h" |
17 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 17 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
19 #include "ui/aura/client/activation_delegate.h" | 19 #include "ui/aura/client/activation_delegate.h" |
20 #include "ui/aura/display_observer.h" | |
21 #include "ui/aura/window_delegate.h" | 20 #include "ui/aura/window_delegate.h" |
22 #include "ui/base/ime/text_input_client.h" | 21 #include "ui/base/ime/text_input_client.h" |
23 #include "ui/compositor/compositor_observer.h" | 22 #include "ui/compositor/compositor_observer.h" |
| 23 #include "ui/gfx/display_observer.h" |
24 #include "ui/gfx/rect.h" | 24 #include "ui/gfx/rect.h" |
25 #include "webkit/glue/webcursor.h" | 25 #include "webkit/glue/webcursor.h" |
26 | 26 |
27 namespace aura { | 27 namespace aura { |
28 class WindowTracker; | 28 class WindowTracker; |
29 } | 29 } |
30 | 30 |
31 namespace gfx { | 31 namespace gfx { |
32 class Canvas; | 32 class Canvas; |
33 class Display; | 33 class Display; |
34 } | 34 } |
35 | 35 |
36 namespace ui { | 36 namespace ui { |
37 class CompositorLock; | 37 class CompositorLock; |
38 class InputMethod; | 38 class InputMethod; |
39 class Texture; | 39 class Texture; |
40 } | 40 } |
41 | 41 |
42 namespace content { | 42 namespace content { |
43 class RenderWidgetHostImpl; | 43 class RenderWidgetHostImpl; |
44 class RenderWidgetHostView; | 44 class RenderWidgetHostView; |
45 | 45 |
46 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. | 46 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. |
47 class RenderWidgetHostViewAura | 47 class RenderWidgetHostViewAura |
48 : public RenderWidgetHostViewBase, | 48 : public RenderWidgetHostViewBase, |
49 public ui::CompositorObserver, | 49 public ui::CompositorObserver, |
50 public ui::TextInputClient, | 50 public ui::TextInputClient, |
51 public aura::DisplayObserver, | 51 public gfx::DisplayObserver, |
52 public aura::WindowDelegate, | 52 public aura::WindowDelegate, |
53 public aura::client::ActivationDelegate, | 53 public aura::client::ActivationDelegate, |
54 public ImageTransportFactoryObserver, | 54 public ImageTransportFactoryObserver, |
55 public base::SupportsWeakPtr<RenderWidgetHostViewAura> { | 55 public base::SupportsWeakPtr<RenderWidgetHostViewAura> { |
56 public: | 56 public: |
57 // RenderWidgetHostView implementation. | 57 // RenderWidgetHostView implementation. |
58 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; | 58 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; |
59 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; | 59 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; |
60 virtual void SetSize(const gfx::Size& size) OVERRIDE; | 60 virtual void SetSize(const gfx::Size& size) OVERRIDE; |
61 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; | 61 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 virtual bool GetSelectionRange(ui::Range* range) OVERRIDE; | 156 virtual bool GetSelectionRange(ui::Range* range) OVERRIDE; |
157 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE; | 157 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE; |
158 virtual bool DeleteRange(const ui::Range& range) OVERRIDE; | 158 virtual bool DeleteRange(const ui::Range& range) OVERRIDE; |
159 virtual bool GetTextFromRange(const ui::Range& range, | 159 virtual bool GetTextFromRange(const ui::Range& range, |
160 string16* text) OVERRIDE; | 160 string16* text) OVERRIDE; |
161 virtual void OnInputMethodChanged() OVERRIDE; | 161 virtual void OnInputMethodChanged() OVERRIDE; |
162 virtual bool ChangeTextDirectionAndLayoutAlignment( | 162 virtual bool ChangeTextDirectionAndLayoutAlignment( |
163 base::i18n::TextDirection direction) OVERRIDE; | 163 base::i18n::TextDirection direction) OVERRIDE; |
164 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE; | 164 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE; |
165 | 165 |
166 // Overridden from aura::DisplayObserver: | 166 // Overridden from gfx::DisplayObserver: |
167 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE; | 167 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE; |
168 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE; | 168 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE; |
169 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE; | 169 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE; |
170 | 170 |
171 // Overridden from aura::WindowDelegate: | 171 // Overridden from aura::WindowDelegate: |
172 virtual gfx::Size GetMinimumSize() const OVERRIDE; | 172 virtual gfx::Size GetMinimumSize() const OVERRIDE; |
173 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 173 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
174 const gfx::Rect& new_bounds) OVERRIDE; | 174 const gfx::Rect& new_bounds) OVERRIDE; |
175 virtual void OnFocus(aura::Window* old_focused_window) OVERRIDE; | 175 virtual void OnFocus(aura::Window* old_focused_window) OVERRIDE; |
176 virtual void OnBlur() OVERRIDE; | 176 virtual void OnBlur() OVERRIDE; |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 NO_PENDING_COMMIT, | 418 NO_PENDING_COMMIT, |
419 }; | 419 }; |
420 CanLockCompositorState can_lock_compositor_; | 420 CanLockCompositorState can_lock_compositor_; |
421 | 421 |
422 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 422 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
423 }; | 423 }; |
424 | 424 |
425 } // namespace content | 425 } // namespace content |
426 | 426 |
427 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 427 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |