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

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

Issue 11273059: ash: Clean up system background layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile errors, hopefully Created 8 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) 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"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "ui/aura/aura_export.h" 15 #include "ui/aura/aura_export.h"
16 #include "ui/aura/client/capture_delegate.h" 16 #include "ui/aura/client/capture_delegate.h"
17 #include "ui/aura/root_window_host_delegate.h" 17 #include "ui/aura/root_window_host_delegate.h"
18 #include "ui/aura/window.h" 18 #include "ui/aura/window.h"
19 #include "ui/base/cursor/cursor.h" 19 #include "ui/base/cursor/cursor.h"
20 #include "ui/base/events/event_constants.h" 20 #include "ui/base/events/event_constants.h"
21 #include "ui/base/events/event_dispatcher.h" 21 #include "ui/base/events/event_dispatcher.h"
22 #include "ui/base/gestures/gesture_recognizer.h" 22 #include "ui/base/gestures/gesture_recognizer.h"
23 #include "ui/base/gestures/gesture_types.h" 23 #include "ui/base/gestures/gesture_types.h"
24 #include "ui/compositor/compositor.h" 24 #include "ui/compositor/compositor.h"
25 #include "ui/compositor/compositor_observer.h" 25 #include "ui/compositor/compositor_observer.h"
26 #include "ui/compositor/layer_animation_observer.h" 26 #include "ui/compositor/layer_animation_observer.h"
27 #include "ui/gfx/native_widget_types.h" 27 #include "ui/gfx/native_widget_types.h"
28 #include "ui/gfx/point.h" 28 #include "ui/gfx/point.h"
29 29
30 class SkCanvas;
31
30 namespace gfx { 32 namespace gfx {
31 class Size; 33 class Size;
32 class Transform; 34 class Transform;
33 } 35 }
34 36
35 namespace ui { 37 namespace ui {
36 class GestureEvent; 38 class GestureEvent;
37 class GestureRecognizer; 39 class GestureRecognizer;
38 class KeyEvent; 40 class KeyEvent;
39 class LayerAnimationSequence; 41 class LayerAnimationSequence;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // release before we resume normal operation. 236 // release before we resume normal operation.
235 void HoldMouseMoves(); 237 void HoldMouseMoves();
236 void ReleaseMouseMoves(); 238 void ReleaseMouseMoves();
237 239
238 // Creates a compositor lock. 240 // Creates a compositor lock.
239 scoped_refptr<CompositorLock> GetCompositorLock(); 241 scoped_refptr<CompositorLock> GetCompositorLock();
240 242
241 // Sets if the window should be focused when shown. 243 // Sets if the window should be focused when shown.
242 void SetFocusWhenShown(bool focus_when_shown); 244 void SetFocusWhenShown(bool focus_when_shown);
243 245
244 // Grabs the snapshot of the root window by using the platform-dependent APIs. 246 // Copies |source_bounds| from the root window (as displayed on the host
247 // machine) to |canvas| at offset |dest_offset|.
248 bool CopyAreaToSkCanvas(const gfx::Rect& source_bounds,
249 const gfx::Point& dest_offset,
250 SkCanvas* canvas);
251
252 // Grabs a snapshot of the root window using platform-specific APIs, encodes
253 // it in PNG format, and saves it to |png_representation|.
245 bool GrabSnapshot(const gfx::Rect& snapshot_bounds, 254 bool GrabSnapshot(const gfx::Rect& snapshot_bounds,
246 std::vector<unsigned char>* png_representation); 255 std::vector<unsigned char>* png_representation);
247 256
248 // Gets the last location seen in a mouse event in this root window's 257 // Gets the last location seen in a mouse event in this root window's
249 // coordinates. This may return a point outside the root window's bounds. 258 // coordinates. This may return a point outside the root window's bounds.
250 gfx::Point GetLastMouseLocationInRoot() const; 259 gfx::Point GetLastMouseLocationInRoot() const;
251 260
252 // Overridden from Window: 261 // Overridden from Window:
253 virtual RootWindow* GetRootWindow() OVERRIDE; 262 virtual RootWindow* GetRootWindow() OVERRIDE;
254 virtual const RootWindow* GetRootWindow() const OVERRIDE; 263 virtual const RootWindow* GetRootWindow() const OVERRIDE;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 421
413 CompositorLock* compositor_lock_; 422 CompositorLock* compositor_lock_;
414 bool draw_on_compositor_unlock_; 423 bool draw_on_compositor_unlock_;
415 424
416 DISALLOW_COPY_AND_ASSIGN(RootWindow); 425 DISALLOW_COPY_AND_ASSIGN(RootWindow);
417 }; 426 };
418 427
419 } // namespace aura 428 } // namespace aura
420 429
421 #endif // UI_AURA_ROOT_WINDOW_H_ 430 #endif // UI_AURA_ROOT_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698