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

Side by Side Diff: ash/display/multi_display_manager.h

Issue 10905242: add ash_resources.grd and necessary changes to use images in ash/resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: presubmit.py Created 8 years, 3 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
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 ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ 5 #ifndef ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_
6 #define ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ 6 #define ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // Used to emulate display change when run in a desktop environment instead 43 // Used to emulate display change when run in a desktop environment instead
44 // of on a device. 44 // of on a device.
45 static void CycleDisplay(); 45 static void CycleDisplay();
46 static void ToggleDisplayScale(); 46 static void ToggleDisplayScale();
47 47
48 // Detects the internal display's ID, and stores gfx::Display 48 // Detects the internal display's ID, and stores gfx::Display
49 // in the cache, if any. 49 // in the cache, if any.
50 void InitInternalDisplayInfo(); 50 void InitInternalDisplayInfo();
51 51
52 void SetOutputNameForPrimaryDisplay(const std::sdtring& name);
53
52 // True if there is an internal display. 54 // True if there is an internal display.
53 bool HasInternalDisplay() const; 55 bool HasInternalDisplay() const;
54 56
55 bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window, 57 bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window,
56 const gfx::Insets& insets); 58 const gfx::Insets& insets);
57 59
58 // Finds the display that contains |point| in screeen coordinates. 60 // Finds the display that contains |point| in screeen coordinates.
59 // Returns invalid display if there is no display that can satisfy 61 // Returns invalid display if there is no display that can satisfy
60 // the condition. 62 // the condition.
61 const gfx::Display& FindDisplayContainingPoint( 63 const gfx::Display& FindDisplayContainingPoint(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 gfx::Display& FindDisplayForRootWindow(const aura::RootWindow* root); 97 gfx::Display& FindDisplayForRootWindow(const aura::RootWindow* root);
96 98
97 // Refer to |aura::DisplayManager::CreateDisplayFromSpec| API for 99 // Refer to |aura::DisplayManager::CreateDisplayFromSpec| API for
98 // the format of |spec|. 100 // the format of |spec|.
99 void AddDisplayFromSpec(const std::string& spec); 101 void AddDisplayFromSpec(const std::string& spec);
100 102
101 // Enables internal display and returns the display Id for the internal 103 // Enables internal display and returns the display Id for the internal
102 // display. 104 // display.
103 int64 EnableInternalDisplayForTest(); 105 int64 EnableInternalDisplayForTest();
104 106
107 void MovePrimaryToTop();
108
105 Displays displays_; 109 Displays displays_;
106 110
107 int64 internal_display_id_; 111 int64 internal_display_id_;
108 112
109 // An internal display cache used when the internal display is disconnectd. 113 // An internal display cache used when the internal display is disconnectd.
110 scoped_ptr<gfx::Display> internal_display_; 114 scoped_ptr<gfx::Display> internal_display_;
111 115
116 std::vector<std::string> output_names_;
117
118 std::string primary_output_name_;
119
112 DISALLOW_COPY_AND_ASSIGN(MultiDisplayManager); 120 DISALLOW_COPY_AND_ASSIGN(MultiDisplayManager);
113 }; 121 };
114 122
115 extern const aura::WindowProperty<int64>* const kDisplayIdKey; 123 extern const aura::WindowProperty<int64>* const kDisplayIdKey;
116 124
117 } // namespace internal 125 } // namespace internal
118 } // namespace ash 126 } // namespace ash
119 127
120 #endif // ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ 128 #endif // ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698