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 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "content/browser/renderer_host/render_widget_host_view.h" | 11 #include "content/browser/renderer_host/render_widget_host_view.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "ui/aura/client/activation_delegate.h" | |
14 #include "ui/aura/window_delegate.h" | 13 #include "ui/aura/window_delegate.h" |
15 #include "ui/gfx/compositor/compositor_observer.h" | 14 #include "ui/gfx/compositor/compositor_observer.h" |
16 #include "webkit/glue/webcursor.h" | 15 #include "webkit/glue/webcursor.h" |
17 | 16 |
18 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 17 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
19 #include "base/callback.h" | 18 #include "base/callback.h" |
20 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
21 #endif | 20 #endif |
22 | 21 |
23 namespace WebKit { | 22 namespace WebKit { |
24 class WebTouchEvent; | 23 class WebTouchEvent; |
25 } | 24 } |
26 | 25 |
27 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 26 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
28 class AcceleratedSurfaceContainerLinux; | 27 class AcceleratedSurfaceContainerLinux; |
29 #endif | 28 #endif |
30 | 29 |
31 class CONTENT_EXPORT RenderWidgetHostViewAura | 30 class CONTENT_EXPORT RenderWidgetHostViewAura |
32 : NON_EXPORTED_BASE(public RenderWidgetHostView), | 31 : NON_EXPORTED_BASE(public RenderWidgetHostView), |
33 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 32 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
34 public ui::CompositorObserver, | 33 public ui::CompositorObserver, |
35 #endif | 34 #endif |
36 public aura::WindowDelegate, | 35 public aura::WindowDelegate { |
37 public aura::ActivationDelegate { | |
38 public: | 36 public: |
39 explicit RenderWidgetHostViewAura(RenderWidgetHost* host); | 37 explicit RenderWidgetHostViewAura(RenderWidgetHost* host); |
40 virtual ~RenderWidgetHostViewAura(); | 38 virtual ~RenderWidgetHostViewAura(); |
41 | 39 |
42 // TODO(derat): Add an abstract RenderWidgetHostView::InitAsChild() method and | 40 // TODO(derat): Add an abstract RenderWidgetHostView::InitAsChild() method and |
43 // update callers: http://crbug.com/102450. | 41 // update callers: http://crbug.com/102450. |
44 void InitAsChild(); | 42 void InitAsChild(); |
45 | 43 |
46 // Overridden from RenderWidgetHostView: | 44 // Overridden from RenderWidgetHostView: |
47 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, | 45 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 108 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
111 const gfx::Rect& new_bounds) OVERRIDE; | 109 const gfx::Rect& new_bounds) OVERRIDE; |
112 virtual void OnFocus() OVERRIDE; | 110 virtual void OnFocus() OVERRIDE; |
113 virtual void OnBlur() OVERRIDE; | 111 virtual void OnBlur() OVERRIDE; |
114 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE; | 112 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE; |
115 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; | 113 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; |
116 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; | 114 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; |
117 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE; | 115 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE; |
118 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE; | 116 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE; |
119 virtual bool CanFocus() OVERRIDE; | 117 virtual bool CanFocus() OVERRIDE; |
| 118 virtual bool ShouldActivate(aura::Event* event) OVERRIDE; |
| 119 virtual void OnActivated() OVERRIDE; |
| 120 virtual void OnLostActive() OVERRIDE; |
120 virtual void OnCaptureLost() OVERRIDE; | 121 virtual void OnCaptureLost() OVERRIDE; |
121 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 122 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
122 virtual void OnWindowDestroying() OVERRIDE; | 123 virtual void OnWindowDestroying() OVERRIDE; |
123 virtual void OnWindowDestroyed() OVERRIDE; | 124 virtual void OnWindowDestroyed() OVERRIDE; |
124 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; | 125 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; |
125 | 126 |
126 // Overridden from aura::ActivationDelegate: | |
127 virtual bool ShouldActivate(aura::Event* event) OVERRIDE; | |
128 virtual void OnActivated() OVERRIDE; | |
129 virtual void OnLostActive() OVERRIDE; | |
130 | |
131 private: | 127 private: |
132 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 128 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
133 // Overridden from ui::CompositorObserver: | 129 // Overridden from ui::CompositorObserver: |
134 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE; | 130 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE; |
135 #endif | 131 #endif |
136 | 132 |
137 void UpdateCursorIfOverSelf(); | 133 void UpdateCursorIfOverSelf(); |
138 void UpdateExternalTexture(); | 134 void UpdateExternalTexture(); |
139 | 135 |
140 // The model object. | 136 // The model object. |
(...skipping 29 matching lines...) Expand all Loading... |
170 | 166 |
171 gfx::PluginWindowHandle current_surface_; | 167 gfx::PluginWindowHandle current_surface_; |
172 #endif | 168 #endif |
173 | 169 |
174 bool skip_schedule_paint_; | 170 bool skip_schedule_paint_; |
175 | 171 |
176 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 172 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
177 }; | 173 }; |
178 | 174 |
179 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 175 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |