Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(867)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 8894018: Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
13 #include "ui/aura/window_delegate.h" 14 #include "ui/aura/window_delegate.h"
14 #include "ui/gfx/compositor/compositor_observer.h" 15 #include "ui/gfx/compositor/compositor_observer.h"
15 #include "webkit/glue/webcursor.h" 16 #include "webkit/glue/webcursor.h"
16 17
17 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) 18 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
18 #include "base/callback.h" 19 #include "base/callback.h"
19 #include "base/memory/ref_counted.h" 20 #include "base/memory/ref_counted.h"
20 #endif 21 #endif
21 22
22 namespace WebKit { 23 namespace WebKit {
23 class WebTouchEvent; 24 class WebTouchEvent;
24 } 25 }
25 26
26 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) 27 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
27 class AcceleratedSurfaceContainerLinux; 28 class AcceleratedSurfaceContainerLinux;
28 #endif 29 #endif
29 30
30 class CONTENT_EXPORT RenderWidgetHostViewAura 31 class CONTENT_EXPORT RenderWidgetHostViewAura
31 : NON_EXPORTED_BASE(public RenderWidgetHostView), 32 : NON_EXPORTED_BASE(public RenderWidgetHostView),
32 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) 33 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
33 public ui::CompositorObserver, 34 public ui::CompositorObserver,
34 #endif 35 #endif
35 public aura::WindowDelegate { 36 public aura::WindowDelegate,
37 public aura::ActivationDelegate {
36 public: 38 public:
37 explicit RenderWidgetHostViewAura(RenderWidgetHost* host); 39 explicit RenderWidgetHostViewAura(RenderWidgetHost* host);
38 virtual ~RenderWidgetHostViewAura(); 40 virtual ~RenderWidgetHostViewAura();
39 41
40 // TODO(derat): Add an abstract RenderWidgetHostView::InitAsChild() method and 42 // TODO(derat): Add an abstract RenderWidgetHostView::InitAsChild() method and
41 // update callers: http://crbug.com/102450. 43 // update callers: http://crbug.com/102450.
42 void InitAsChild(); 44 void InitAsChild();
43 45
44 // Overridden from RenderWidgetHostView: 46 // Overridden from RenderWidgetHostView:
45 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, 47 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, 110 virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
109 const gfx::Rect& new_bounds) OVERRIDE; 111 const gfx::Rect& new_bounds) OVERRIDE;
110 virtual void OnFocus() OVERRIDE; 112 virtual void OnFocus() OVERRIDE;
111 virtual void OnBlur() OVERRIDE; 113 virtual void OnBlur() OVERRIDE;
112 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE; 114 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE;
113 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; 115 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE;
114 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; 116 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE;
115 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE; 117 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE;
116 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE; 118 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE;
117 virtual bool CanFocus() OVERRIDE; 119 virtual bool CanFocus() OVERRIDE;
118 virtual bool ShouldActivate(aura::Event* event) OVERRIDE;
119 virtual void OnActivated() OVERRIDE;
120 virtual void OnLostActive() OVERRIDE;
121 virtual void OnCaptureLost() OVERRIDE; 120 virtual void OnCaptureLost() OVERRIDE;
122 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 121 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
123 virtual void OnWindowDestroying() OVERRIDE; 122 virtual void OnWindowDestroying() OVERRIDE;
124 virtual void OnWindowDestroyed() OVERRIDE; 123 virtual void OnWindowDestroyed() OVERRIDE;
125 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; 124 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE;
126 125
126 // Overridden from aura::ActivationDelegate:
127 virtual bool ShouldActivate(aura::Event* event) OVERRIDE;
128 virtual void OnActivated() OVERRIDE;
129 virtual void OnLostActive() OVERRIDE;
130
127 private: 131 private:
128 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) 132 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
129 // Overridden from ui::CompositorObserver: 133 // Overridden from ui::CompositorObserver:
130 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE; 134 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE;
131 #endif 135 #endif
132 136
133 void UpdateCursorIfOverSelf(); 137 void UpdateCursorIfOverSelf();
134 void UpdateExternalTexture(); 138 void UpdateExternalTexture();
135 139
136 // The model object. 140 // The model object.
(...skipping 29 matching lines...) Expand all
166 170
167 gfx::PluginWindowHandle current_surface_; 171 gfx::PluginWindowHandle current_surface_;
168 #endif 172 #endif
169 173
170 bool skip_schedule_paint_; 174 bool skip_schedule_paint_;
171 175
172 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 176 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
173 }; 177 };
174 178
175 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 179 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW
« no previous file with comments | « chrome/test/base/browser_with_test_window_test.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698