| 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 #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_base.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "ui/aura/client/activation_delegate.h" | 13 #include "ui/aura/client/activation_delegate.h" |
| 14 #include "ui/aura/window_delegate.h" | 14 #include "ui/aura/window_delegate.h" |
| 15 #include "ui/base/ime/text_input_client.h" | 15 #include "ui/base/ime/text_input_client.h" |
| 16 #include "ui/gfx/compositor/compositor_observer.h" |
| 16 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 17 #include "ui/gfx/compositor/compositor_observer.h" | |
| 18 #include "webkit/glue/webcursor.h" | 18 #include "webkit/glue/webcursor.h" |
| 19 | 19 |
| 20 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 20 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 21 #include "base/callback.h" | 21 #include "base/callback.h" |
| 22 #include "base/memory/ref_counted.h" | 22 #include "base/memory/ref_counted.h" |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 namespace content { |
| 26 class RenderWidgetHostView; |
| 27 } |
| 28 |
| 25 namespace gfx { | 29 namespace gfx { |
| 26 class Canvas; | 30 class Canvas; |
| 27 } | 31 } |
| 28 | 32 |
| 29 namespace ui { | 33 namespace ui { |
| 30 class InputMethod; | 34 class InputMethod; |
| 31 } | 35 } |
| 32 | 36 |
| 33 namespace WebKit { | 37 namespace WebKit { |
| 34 class WebTouchEvent; | 38 class WebTouchEvent; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 60 virtual bool HasFocus() const OVERRIDE; | 64 virtual bool HasFocus() const OVERRIDE; |
| 61 virtual void Show() OVERRIDE; | 65 virtual void Show() OVERRIDE; |
| 62 virtual void Hide() OVERRIDE; | 66 virtual void Hide() OVERRIDE; |
| 63 virtual bool IsShowing() OVERRIDE; | 67 virtual bool IsShowing() OVERRIDE; |
| 64 virtual gfx::Rect GetViewBounds() const OVERRIDE; | 68 virtual gfx::Rect GetViewBounds() const OVERRIDE; |
| 65 virtual void UnhandledWheelEvent( | 69 virtual void UnhandledWheelEvent( |
| 66 const WebKit::WebMouseWheelEvent& event) OVERRIDE; | 70 const WebKit::WebMouseWheelEvent& event) OVERRIDE; |
| 67 virtual void SetBackground(const SkBitmap& background) OVERRIDE; | 71 virtual void SetBackground(const SkBitmap& background) OVERRIDE; |
| 68 | 72 |
| 69 // Overridden from RenderWidgetHostViewPort: | 73 // Overridden from RenderWidgetHostViewPort: |
| 70 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, | 74 virtual void InitAsPopup(content::RenderWidgetHostView* parent_host_view, |
| 71 const gfx::Rect& pos) OVERRIDE; | 75 const gfx::Rect& pos) OVERRIDE; |
| 72 virtual void InitAsFullscreen( | 76 virtual void InitAsFullscreen( |
| 73 RenderWidgetHostView* reference_host_view) OVERRIDE; | 77 content::RenderWidgetHostView* reference_host_view) OVERRIDE; |
| 74 virtual void DidBecomeSelected() OVERRIDE; | 78 virtual void DidBecomeSelected() OVERRIDE; |
| 75 virtual void WasHidden() OVERRIDE; | 79 virtual void WasHidden() OVERRIDE; |
| 76 virtual void MovePluginWindows( | 80 virtual void MovePluginWindows( |
| 77 const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; | 81 const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; |
| 78 virtual void Focus() OVERRIDE; | 82 virtual void Focus() OVERRIDE; |
| 79 virtual void Blur() OVERRIDE; | 83 virtual void Blur() OVERRIDE; |
| 80 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; | 84 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; |
| 81 virtual void SetIsLoading(bool is_loading) OVERRIDE; | 85 virtual void SetIsLoading(bool is_loading) OVERRIDE; |
| 82 virtual void TextInputStateChanged(ui::TextInputType type, | 86 virtual void TextInputStateChanged(ui::TextInputType type, |
| 83 bool can_compose_inline) OVERRIDE; | 87 bool can_compose_inline) OVERRIDE; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 virtual void OnWindowDestroying() OVERRIDE; | 163 virtual void OnWindowDestroying() OVERRIDE; |
| 160 virtual void OnWindowDestroyed() OVERRIDE; | 164 virtual void OnWindowDestroyed() OVERRIDE; |
| 161 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; | 165 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; |
| 162 | 166 |
| 163 // Overridden from aura::client::ActivationDelegate: | 167 // Overridden from aura::client::ActivationDelegate: |
| 164 virtual bool ShouldActivate(aura::Event* event) OVERRIDE; | 168 virtual bool ShouldActivate(aura::Event* event) OVERRIDE; |
| 165 virtual void OnActivated() OVERRIDE; | 169 virtual void OnActivated() OVERRIDE; |
| 166 virtual void OnLostActive() OVERRIDE; | 170 virtual void OnLostActive() OVERRIDE; |
| 167 | 171 |
| 168 protected: | 172 protected: |
| 169 friend class RenderWidgetHostView; | 173 friend class content::RenderWidgetHostView; |
| 170 | 174 |
| 171 // Should construct only via RenderWidgetHostView::CreateViewForWidget. | 175 // Should construct only via RenderWidgetHostView::CreateViewForWidget. |
| 172 explicit RenderWidgetHostViewAura(RenderWidgetHost* host); | 176 explicit RenderWidgetHostViewAura(RenderWidgetHost* host); |
| 173 | 177 |
| 174 private: | 178 private: |
| 175 class WindowObserver; | 179 class WindowObserver; |
| 176 friend class WindowObserver; | 180 friend class WindowObserver; |
| 177 | 181 |
| 178 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 182 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 179 // Overridden from ui::CompositorObserver: | 183 // Overridden from ui::CompositorObserver: |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // In mouse locked mode, we syntheticaly move the mouse cursor to the center | 274 // In mouse locked mode, we syntheticaly move the mouse cursor to the center |
| 271 // of the window when it reaches the window borders to avoid it going outside. | 275 // of the window when it reaches the window borders to avoid it going outside. |
| 272 // This flag is used to differentiate between these synthetic mouse move | 276 // This flag is used to differentiate between these synthetic mouse move |
| 273 // events vs. normal mouse move events. | 277 // events vs. normal mouse move events. |
| 274 bool synthetic_move_sent_; | 278 bool synthetic_move_sent_; |
| 275 | 279 |
| 276 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 280 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 277 }; | 281 }; |
| 278 | 282 |
| 279 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 283 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |