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

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

Issue 11360045: ash: Add RootWindowHostFactory class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/root_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) 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 UI_AURA_ROOT_WINDOW_H_ 5 #ifndef UI_AURA_ROOT_WINDOW_H_
6 #define UI_AURA_ROOT_WINDOW_H_ 6 #define UI_AURA_ROOT_WINDOW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 30 matching lines...) Expand all
41 class LayerAnimationSequence; 41 class LayerAnimationSequence;
42 class MouseEvent; 42 class MouseEvent;
43 class ScrollEvent; 43 class ScrollEvent;
44 class TouchEvent; 44 class TouchEvent;
45 class ViewProp; 45 class ViewProp;
46 } 46 }
47 47
48 namespace aura { 48 namespace aura {
49 49
50 class RootWindow; 50 class RootWindow;
51 class RootWindowDelegate;
51 class RootWindowHost; 52 class RootWindowHost;
52 class RootWindowObserver; 53 class RootWindowObserver;
53 54
54 // RootWindow is responsible for hosting a set of windows. 55 // RootWindow is responsible for hosting a set of windows.
55 class AURA_EXPORT RootWindow : public ui::CompositorDelegate, 56 class AURA_EXPORT RootWindow : public ui::CompositorDelegate,
56 public ui::CompositorObserver, 57 public ui::CompositorObserver,
57 public Window, 58 public Window,
58 public ui::EventDispatcherDelegate, 59 public ui::EventDispatcherDelegate,
59 public ui::GestureEventHelper, 60 public ui::GestureEventHelper,
60 public ui::LayerAnimationObserver, 61 public ui::LayerAnimationObserver,
61 public aura::client::CaptureDelegate, 62 public aura::client::CaptureDelegate,
62 public aura::RootWindowHostDelegate { 63 public aura::RootWindowHostDelegate {
63 public: 64 public:
64 struct AURA_EXPORT CreateParams { 65 struct AURA_EXPORT CreateParams {
65 // CreateParams with initial_bounds and default host. 66 // CreateParams with initial_bounds and default host.
66 CreateParams(const gfx::Rect& initial_bounds); 67 CreateParams(const gfx::Rect& initial_bounds);
67 ~CreateParams() {} 68 ~CreateParams() {}
68 69
69 gfx::Rect initial_bounds; 70 gfx::Rect initial_bounds;
70 71
71 // A host to use in place of the default one that RootWindow will create. 72 // RootWindow delegate. Can be used to create a host to use in place of the
73 // default one that RootWindow will create.
72 // NULL by default. 74 // NULL by default.
73 RootWindowHost* host; 75 RootWindowDelegate* delegate;
Ben Goodger (Google) 2012/12/11 01:14:02 Why can't you just set host to the value you want?
reveman 2012/12/11 07:23:30 OK, I like this. We don't need RootWindowDelegate.
74 }; 76 };
75 77
76 explicit RootWindow(const CreateParams& params); 78 explicit RootWindow(const CreateParams& params);
77 virtual ~RootWindow(); 79 virtual ~RootWindow();
78 80
79 // Returns the RootWindowHost for the specified accelerated widget, or NULL 81 // Returns the RootWindowHost for the specified accelerated widget, or NULL
80 // if there is none associated. 82 // if there is none associated.
81 static RootWindow* GetForAcceleratedWidget(gfx::AcceleratedWidget widget); 83 static RootWindow* GetForAcceleratedWidget(gfx::AcceleratedWidget widget);
82 84
83 ui::Compositor* compositor() { return compositor_.get(); } 85 ui::Compositor* compositor() { return compositor_.get(); }
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 gfx::Rect GetInitialHostWindowBounds() const; 346 gfx::Rect GetInitialHostWindowBounds() const;
345 347
346 // Posts a task to send synthesized mouse move event if there 348 // Posts a task to send synthesized mouse move event if there
347 // is no a pending task. 349 // is no a pending task.
348 void PostMouseMoveEventAfterWindowChange(); 350 void PostMouseMoveEventAfterWindowChange();
349 351
350 // Creates and dispatches synthesized mouse move event using the 352 // Creates and dispatches synthesized mouse move event using the
351 // current mouse location. 353 // current mouse location.
352 void SynthesizeMouseMoveEvent(); 354 void SynthesizeMouseMoveEvent();
353 355
356 scoped_ptr<RootWindowDelegate> delegate_;
357
354 scoped_ptr<ui::Compositor> compositor_; 358 scoped_ptr<ui::Compositor> compositor_;
355 359
356 scoped_ptr<RootWindowHost> host_; 360 scoped_ptr<RootWindowHost> host_;
357 361
358 // Used to schedule painting. 362 // Used to schedule painting.
359 base::WeakPtrFactory<RootWindow> schedule_paint_factory_; 363 base::WeakPtrFactory<RootWindow> schedule_paint_factory_;
360 364
361 // Use to post mouse move event. 365 // Use to post mouse move event.
362 base::WeakPtrFactory<RootWindow> event_factory_; 366 base::WeakPtrFactory<RootWindow> event_factory_;
363 367
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 base::WeakPtrFactory<RootWindow> held_mouse_event_factory_; 399 base::WeakPtrFactory<RootWindow> held_mouse_event_factory_;
396 400
397 scoped_ptr<ui::ViewProp> prop_; 401 scoped_ptr<ui::ViewProp> prop_;
398 402
399 DISALLOW_COPY_AND_ASSIGN(RootWindow); 403 DISALLOW_COPY_AND_ASSIGN(RootWindow);
400 }; 404 };
401 405
402 } // namespace aura 406 } // namespace aura
403 407
404 #endif // UI_AURA_ROOT_WINDOW_H_ 408 #endif // UI_AURA_ROOT_WINDOW_H_
OLDNEW
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698