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

Side by Side Diff: ash/ash_root_window_transformer.h

Issue 15730006: Use the source display's pixel size as a mirror window's size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 6 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 | « ash/ash.gyp ('k') | ash/ash_root_window_transformer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_ASH_ROOT_WINDOW_TRANSFORMER_H_
6 #define ASH_ASH_ROOT_WINDOW_TRANSFORMER_H_
7
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/aura/root_window_transformer.h"
12 #include "ui/gfx/insets.h"
13 #include "ui/gfx/transform.h"
14
15 namespace aura {
16 class RootWindow;
17 }
18
19 namespace gfx {
20 class Display;
21 }
22
23 namespace ash {
24
25 // RootWindowTransformer for ash environment.
26 class ASH_EXPORT AshRootWindowTransformer : public aura::RootWindowTransformer {
27 public:
28 AshRootWindowTransformer(aura::RootWindow* root,
29 const gfx::Display& display);
30 // aura::RootWindowTransformer overrides:
31 virtual gfx::Transform GetTransform() const OVERRIDE;
32 virtual gfx::Transform GetInverseTransform() const OVERRIDE;
33 virtual gfx::Rect GetRootWindowBounds(
34 const gfx::Size& host_size) const OVERRIDE;
35 virtual gfx::Insets GetHostInsets() const OVERRIDE;
36
37 private:
38 virtual ~AshRootWindowTransformer();
39
40 aura::RootWindow* root_window_;
41 gfx::Transform transform_;
42
43 // The accurate representation of the inverse of the |transform_|.
44 // This is used to avoid computation error caused by
45 // |gfx::Transform::GetInverse|.
46 gfx::Transform invert_transform_;
47
48 // The transform of the root window bounds. This is used to calculate
49 // the size of root window.
50 gfx::Transform root_window_bounds_transform_;
51
52 // The scale of the root window. This is used to expand the
53 // area of the root window (useful in HighDPI display).
54 // Note that this should not be confused with the device scale
55 // factor, which specfies the pixel density of the display.
56 float root_window_ui_scale_;
57
58 gfx::Insets host_insets_;
59
60 DISALLOW_COPY_AND_ASSIGN(AshRootWindowTransformer);
61 };
62
63 } // namespace ash
64
65 #endif // ASH_ASH_ROOT_WINDOW_TRANSFORMER_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/ash_root_window_transformer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698