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

Side by Side Diff: ash/system/chromeos/tray_display.cc

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/magnifier/magnification_controller.cc ('k') | no next file » | 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 #include "ash/system/chromeos/tray_display.h" 5 #include "ash/system/chromeos/tray_display.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 chromeos::OutputState InferOutputState() const { 73 chromeos::OutputState InferOutputState() const {
74 return Shell::GetScreen()->GetNumDisplays() == 1 ? 74 return Shell::GetScreen()->GetNumDisplays() == 1 ?
75 chromeos::STATE_SINGLE : chromeos::STATE_DUAL_EXTENDED; 75 chromeos::STATE_SINGLE : chromeos::STATE_DUAL_EXTENDED;
76 } 76 }
77 77
78 private: 78 private:
79 // Returns the name of the currently connected external display. 79 // Returns the name of the currently connected external display.
80 base::string16 GetExternalDisplayName() const { 80 base::string16 GetExternalDisplayName() const {
81 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); 81 DisplayManager* display_manager = Shell::GetInstance()->display_manager();
82 int64 external_id = display_manager->mirrored_display_id(); 82 int64 external_id = display_manager->mirrored_display().id();
83 83
84 if (external_id == gfx::Display::kInvalidDisplayID) { 84 if (external_id == gfx::Display::kInvalidDisplayID) {
85 int64 internal_display_id = gfx::Display::InternalDisplayId(); 85 int64 internal_display_id = gfx::Display::InternalDisplayId();
86 int64 first_display_id = display_manager->first_display_id(); 86 int64 first_display_id = display_manager->first_display_id();
87 for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) { 87 for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
88 int64 id = display_manager->GetDisplayAt(i)->id(); 88 int64 id = display_manager->GetDisplayAt(i)->id();
89 if (id != internal_display_id && id != first_display_id) { 89 if (id != internal_display_id && id != first_display_id) {
90 external_id = id; 90 external_id = id;
91 break; 91 break;
92 } 92 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 #if defined(OS_CHROMEOS) 161 #if defined(OS_CHROMEOS)
162 void TrayDisplay::OnDisplayModeChanged() { 162 void TrayDisplay::OnDisplayModeChanged() {
163 if (default_) 163 if (default_)
164 default_->Update(); 164 default_->Update();
165 } 165 }
166 #endif 166 #endif
167 167
168 } // namespace internal 168 } // namespace internal
169 } // namespace ash 169 } // namespace ash
OLDNEW
« no previous file with comments | « ash/magnifier/magnification_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698