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

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

Issue 8351042: Gets disable inactive frame rendering to work correctly for aura. This (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years, 1 month 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 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 "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 virtual void RunShellDrag(View* view, 110 virtual void RunShellDrag(View* view,
111 const ui::OSExchangeData& data, 111 const ui::OSExchangeData& data,
112 int operation) OVERRIDE; 112 int operation) OVERRIDE;
113 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; 113 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
114 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; 114 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
115 virtual void ClearNativeFocus() OVERRIDE; 115 virtual void ClearNativeFocus() OVERRIDE;
116 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; 116 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE;
117 virtual bool ConvertPointFromAncestor( 117 virtual bool ConvertPointFromAncestor(
118 const Widget* ancestor, gfx::Point* point) const OVERRIDE; 118 const Widget* ancestor, gfx::Point* point) const OVERRIDE;
119 virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE; 119 virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE;
120 virtual void SetInactiveRenderingDisabled(bool value) OVERRIDE;
120 121
121 // Overridden from views::InputMethodDelegate: 122 // Overridden from views::InputMethodDelegate:
122 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE; 123 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE;
123 124
124 // Overridden from aura::WindowDelegate: 125 // Overridden from aura::WindowDelegate:
125 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, 126 virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
126 const gfx::Rect& new_bounds) OVERRIDE; 127 const gfx::Rect& new_bounds) OVERRIDE;
127 virtual void OnFocus() OVERRIDE; 128 virtual void OnFocus() OVERRIDE;
128 virtual void OnBlur() OVERRIDE; 129 virtual void OnBlur() OVERRIDE;
129 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE; 130 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE;
130 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; 131 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE;
131 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; 132 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE;
132 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE; 133 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE;
133 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE; 134 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE;
134 virtual bool ShouldActivate(aura::Event* event) OVERRIDE; 135 virtual bool ShouldActivate(aura::Event* event) OVERRIDE;
135 virtual void OnActivated() OVERRIDE; 136 virtual void OnActivated() OVERRIDE;
136 virtual void OnLostActive() OVERRIDE; 137 virtual void OnLostActive() OVERRIDE;
137 virtual void OnCaptureLost() OVERRIDE; 138 virtual void OnCaptureLost() OVERRIDE;
138 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 139 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
139 virtual void OnWindowDestroying() OVERRIDE; 140 virtual void OnWindowDestroying() OVERRIDE;
140 virtual void OnWindowDestroyed() OVERRIDE; 141 virtual void OnWindowDestroyed() OVERRIDE;
141 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; 142 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE;
142 143
143 private: 144 private:
145 class DesktopObserverImpl;
146
144 internal::NativeWidgetDelegate* delegate_; 147 internal::NativeWidgetDelegate* delegate_;
145 148
146 aura::Window* window_; 149 aura::Window* window_;
147 150
148 // See class documentation for Widget in widget.h for a note about ownership. 151 // See class documentation for Widget in widget.h for a note about ownership.
149 Widget::InitParams::Ownership ownership_; 152 Widget::InitParams::Ownership ownership_;
150 153
151 // The following factory is used for calls to close the NativeWidgetAura 154 // The following factory is used for calls to close the NativeWidgetAura
152 // instance. 155 // instance.
153 base::WeakPtrFactory<NativeWidgetAura> close_widget_factory_; 156 base::WeakPtrFactory<NativeWidgetAura> close_widget_factory_;
154 157
155 // Can we be made active? 158 // Can we be made active?
156 bool can_activate_; 159 bool can_activate_;
157 160
158 gfx::NativeCursor cursor_; 161 gfx::NativeCursor cursor_;
159 162
160 scoped_ptr<TooltipManagerViews> tooltip_manager_; 163 scoped_ptr<TooltipManagerViews> tooltip_manager_;
161 164
165 scoped_ptr<DesktopObserverImpl> desktop_observer_;
166
162 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); 167 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura);
163 }; 168 };
164 169
165 } // namespace views 170 } // namespace views
166 171
167 #endif // VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ 172 #endif // VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698