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

Side by Side Diff: views/widget/native_widget_aura.h

Issue 8289022: Wires keeping the launcher up to date with the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years, 2 months 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
« no previous file with comments | « ui/ui.gyp ('k') | views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_
6 #define VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ 6 #define VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include "base/memory/scoped_vector.h"
10
11 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
12 #include "ui/aura/window_delegate.h" 11 #include "ui/aura/window_delegate.h"
13 #include "views/views_export.h" 12 #include "views/views_export.h"
14 #include "views/widget/native_widget_private.h" 13 #include "views/widget/native_widget_private.h"
15 14
16 namespace aura { 15 namespace aura {
17 class Window; 16 class Window;
18 } 17 }
19 namespace gfx { 18 namespace gfx {
20 class Font; 19 class Font;
21 } 20 }
22 21
22 namespace ui {
23 class ViewProp;
24 }
25
23 namespace views { 26 namespace views {
24 27
25 class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate, 28 class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate,
26 public aura::WindowDelegate { 29 public aura::WindowDelegate {
27 public: 30 public:
28 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); 31 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate);
29 virtual ~NativeWidgetAura(); 32 virtual ~NativeWidgetAura();
30 33
31 // TODO(beng): Find a better place for this, and the similar method on 34 // TODO(beng): Find a better place for this, and the similar method on
32 // NativeWidgetWin. 35 // NativeWidgetWin.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 virtual bool ShouldActivate(aura::MouseEvent* event) OVERRIDE; 134 virtual bool ShouldActivate(aura::MouseEvent* event) OVERRIDE;
132 virtual void OnActivated() OVERRIDE; 135 virtual void OnActivated() OVERRIDE;
133 virtual void OnLostActive() OVERRIDE; 136 virtual void OnLostActive() OVERRIDE;
134 virtual void OnCaptureLost() OVERRIDE; 137 virtual void OnCaptureLost() OVERRIDE;
135 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 138 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
136 virtual void OnWindowDestroying() OVERRIDE; 139 virtual void OnWindowDestroying() OVERRIDE;
137 virtual void OnWindowDestroyed() OVERRIDE; 140 virtual void OnWindowDestroyed() OVERRIDE;
138 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; 141 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE;
139 142
140 private: 143 private:
141 typedef std::map<const char*, void*> PropsMap; 144 typedef ScopedVector<ui::ViewProp> ViewProps;
142 145
143 internal::NativeWidgetDelegate* delegate_; 146 internal::NativeWidgetDelegate* delegate_;
144 147
145 aura::Window* window_; 148 aura::Window* window_;
146 149
147 // See class documentation for Widget in widget.h for a note about ownership. 150 // See class documentation for Widget in widget.h for a note about ownership.
148 Widget::InitParams::Ownership ownership_; 151 Widget::InitParams::Ownership ownership_;
149 152
150 // The following factory is used for calls to close the NativeWidgetAura 153 // The following factory is used for calls to close the NativeWidgetAura
151 // instance. 154 // instance.
152 base::WeakPtrFactory<NativeWidgetAura> close_widget_factory_; 155 base::WeakPtrFactory<NativeWidgetAura> close_widget_factory_;
153 156
154 bool can_activate_; 157 bool can_activate_;
155 158
156 // Map used by Set/GetNativeWindowProperty. 159 gfx::NativeCursor cursor_;
157 PropsMap props_map_;
158 160
159 gfx::NativeCursor cursor_; 161 ViewProps props_;
160 162
161 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); 163 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura);
162 }; 164 };
163 165
164 } // namespace views 166 } // namespace views
165 167
166 #endif // VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ 168 #endif // VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_
OLDNEW
« no previous file with comments | « ui/ui.gyp ('k') | views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698