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

Side by Side Diff: ui/aura/window.h

Issue 8362006: Reland r107720 - Enable the new layer animation framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 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
« no previous file with comments | « ui/aura/screen_rotation.cc ('k') | ui/aura/window.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 UI_AURA_WINDOW_H_ 5 #ifndef UI_AURA_WINDOW_H_
6 #define UI_AURA_WINDOW_H_ 6 #define UI_AURA_WINDOW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "base/string16.h" 15 #include "base/string16.h"
16 #include "ui/base/events.h" 16 #include "ui/base/events.h"
17 #include "ui/base/ui_base_types.h" 17 #include "ui/base/ui_base_types.h"
18 #include "ui/aura/aura_export.h" 18 #include "ui/aura/aura_export.h"
19 #include "ui/gfx/compositor/layer.h" 19 #include "ui/gfx/compositor/layer.h"
20 #include "ui/gfx/compositor/layer_animator.h"
20 #include "ui/gfx/compositor/layer_delegate.h" 21 #include "ui/gfx/compositor/layer_delegate.h"
21 #include "ui/gfx/native_widget_types.h" 22 #include "ui/gfx/native_widget_types.h"
22 #include "ui/gfx/rect.h" 23 #include "ui/gfx/rect.h"
23 24
24 class SkCanvas; 25 class SkCanvas;
25 26
26 namespace ui { 27 namespace ui {
27 class Animation; 28 class Animation;
28 class Compositor; 29 class Compositor;
29 class Layer; 30 class Layer;
31 class LayerAnimationSequence;
30 class Transform; 32 class Transform;
31 class ViewProp; 33 class ViewProp;
32 } 34 }
33 35
34 namespace aura { 36 namespace aura {
35 37
36 class Desktop; 38 class Desktop;
37 class EventFilter; 39 class EventFilter;
38 class KeyEvent; 40 class KeyEvent;
39 class LayoutManager; 41 class LayoutManager;
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 263
262 // Sets the window property |value| for given |name|. Setting NULL 264 // Sets the window property |value| for given |name|. Setting NULL
263 // removes the property. It uses |ui::ViewProp| to store the property. 265 // removes the property. It uses |ui::ViewProp| to store the property.
264 // Please see the description of |prop_map_| for more details. 266 // Please see the description of |prop_map_| for more details.
265 void SetProperty(const char* name, void* value); 267 void SetProperty(const char* name, void* value);
266 268
267 // Returns the window property for given |name|. Returns NULL if 269 // Returns the window property for given |name|. Returns NULL if
268 // the property does not exist. 270 // the property does not exist.
269 void* GetProperty(const char* name) const; 271 void* GetProperty(const char* name) const;
270 272
271 // Returns an animation configured with the default duration. All animations
272 // should use this. Caller owns returned value.
273 static ui::Animation* CreateDefaultAnimation();
274
275 protected: 273 protected:
276 // Returns the desktop or NULL if we aren't yet attached to a desktop. 274 // Returns the desktop or NULL if we aren't yet attached to a desktop.
277 virtual Desktop* GetDesktop(); 275 virtual Desktop* GetDesktop();
278 276
279 private: 277 private:
280 friend class LayoutManager; 278 friend class LayoutManager;
281 279
282 // Changes the bounds of the window without condition. 280 // Changes the bounds of the window without condition.
283 void SetBoundsInternal(const gfx::Rect& new_bounds); 281 void SetBoundsInternal(const gfx::Rect& new_bounds);
284 282
(...skipping 17 matching lines...) Expand all
302 // furthest down the hierarchy) Window containing the point; otherwise, 300 // furthest down the hierarchy) Window containing the point; otherwise,
303 // returns the loosest. If |for_event_handling| is true, then hit-test masks 301 // returns the loosest. If |for_event_handling| is true, then hit-test masks
304 // and StopsEventPropagation() are honored; otherwise, only bounds checks are 302 // and StopsEventPropagation() are honored; otherwise, only bounds checks are
305 // performed. 303 // performed.
306 Window* GetWindowForPoint(const gfx::Point& local_point, 304 Window* GetWindowForPoint(const gfx::Point& local_point,
307 bool return_tightest, 305 bool return_tightest,
308 bool for_event_handling); 306 bool for_event_handling);
309 307
310 // Overridden from ui::LayerDelegate: 308 // Overridden from ui::LayerDelegate:
311 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; 309 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
312 virtual void OnLayerAnimationEnded(const ui::Animation* animation) OVERRIDE; 310 virtual void OnLayerAnimationEnded(
311 const ui::LayerAnimationSequence* animation) OVERRIDE;
313 312
314 int type_; 313 int type_;
315 314
316 WindowDelegate* delegate_; 315 WindowDelegate* delegate_;
317 316
318 ui::WindowShowState show_state_; 317 ui::WindowShowState show_state_;
319 318
320 // The original bounds of a maximized/fullscreen window. 319 // The original bounds of a maximized/fullscreen window.
321 gfx::Rect restore_bounds_; 320 gfx::Rect restore_bounds_;
322 321
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // TODO(oshima): Consolidcate ViewProp and aura::window property 355 // TODO(oshima): Consolidcate ViewProp and aura::window property
357 // implementation. 356 // implementation.
358 std::map<const char*, ui::ViewProp*> prop_map_; 357 std::map<const char*, ui::ViewProp*> prop_map_;
359 358
360 DISALLOW_COPY_AND_ASSIGN(Window); 359 DISALLOW_COPY_AND_ASSIGN(Window);
361 }; 360 };
362 361
363 } // namespace aura 362 } // namespace aura
364 363
365 #endif // UI_AURA_WINDOW_H_ 364 #endif // UI_AURA_WINDOW_H_
OLDNEW
« no previous file with comments | « ui/aura/screen_rotation.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698