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

Side by Side Diff: ui/gfx/monitor.h

Issue 10388036: Adds the option of aligning the launcher to the left or right. There (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 8 years, 7 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 | « chrome/common/chrome_switches.cc ('k') | ui/gfx/monitor.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_GFX_MONITOR_H_ 5 #ifndef UI_GFX_MONITOR_H_
6 #define UI_GFX_MONITOR_H_ 6 #define UI_GFX_MONITOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // standard monitors (which is around 100~120dpi.) The potential return 48 // standard monitors (which is around 100~120dpi.) The potential return
49 // values depend on each platforms. 49 // values depend on each platforms.
50 float device_scale_factor() const { return device_scale_factor_; } 50 float device_scale_factor() const { return device_scale_factor_; }
51 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } 51 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; }
52 52
53 // Utility functions that just return the size of monitor and 53 // Utility functions that just return the size of monitor and
54 // work area. 54 // work area.
55 const Size& size() const { return bounds_.size(); } 55 const Size& size() const { return bounds_.size(); }
56 const Size& work_area_size() const { return work_area_.size(); } 56 const Size& work_area_size() const { return work_area_.size(); }
57 57
58 // Returns the work area insets.
59 Insets GetWorkAreaInsets() const;
60
58 // Sets the device scale factor and monitor bounds in pixel. This 61 // Sets the device scale factor and monitor bounds in pixel. This
59 // updates the work are using the same insets between old bounds and 62 // updates the work are using the same insets between old bounds and
60 // work area. 63 // work area.
61 void SetScaleAndBounds(float device_scale_factor, 64 void SetScaleAndBounds(float device_scale_factor,
62 const gfx::Rect& bounds_in_pixel); 65 const gfx::Rect& bounds_in_pixel);
63 66
64 // Sets the monitor's size. This updates the work area using the same insets 67 // Sets the monitor's size. This updates the work area using the same insets
65 // between old bounds and work area. 68 // between old bounds and work area.
66 void SetSize(const gfx::Size& size_in_pixel); 69 void SetSize(const gfx::Size& size_in_pixel);
67 70
(...skipping 21 matching lines...) Expand all
89 Rect work_area_; 92 Rect work_area_;
90 #if defined(USE_AURA) 93 #if defined(USE_AURA)
91 Rect bounds_in_pixel_; 94 Rect bounds_in_pixel_;
92 #endif 95 #endif
93 float device_scale_factor_; 96 float device_scale_factor_;
94 }; 97 };
95 98
96 } // namespace gfx 99 } // namespace gfx
97 100
98 #endif // UI_GFX_MONITOR_H_ 101 #endif // UI_GFX_MONITOR_H_
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | ui/gfx/monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698