OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/shell/browser/shell_desktop_controller_aura.h" | 5 #include "extensions/shell/browser/shell_desktop_controller_aura.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 159 |
160 } // namespace | 160 } // namespace |
161 | 161 |
162 ShellDesktopControllerAura::ShellDesktopControllerAura() | 162 ShellDesktopControllerAura::ShellDesktopControllerAura() |
163 : app_window_client_(new ShellAppWindowClient) { | 163 : app_window_client_(new ShellAppWindowClient) { |
164 extensions::AppWindowClient::Set(app_window_client_.get()); | 164 extensions::AppWindowClient::Set(app_window_client_.get()); |
165 | 165 |
166 #if defined(OS_CHROMEOS) | 166 #if defined(OS_CHROMEOS) |
167 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( | 167 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( |
168 this); | 168 this); |
169 display_configurator_.reset(new ui::DisplayConfigurator); | 169 display_configurator_ = DisplayConfigurator::GetInstance(); |
170 display_configurator_->Init(false); | 170 display_configurator_->Init(false); |
171 display_configurator_->ForceInitialConfigure(0); | 171 display_configurator_->ForceInitialConfigure(0); |
172 display_configurator_->AddObserver(this); | 172 display_configurator_->AddObserver(this); |
173 #endif | 173 #endif |
174 CreateRootWindow(); | 174 CreateRootWindow(); |
175 } | 175 } |
176 | 176 |
177 ShellDesktopControllerAura::~ShellDesktopControllerAura() { | 177 ShellDesktopControllerAura::~ShellDesktopControllerAura() { |
178 CloseAppWindows(); | 178 CloseAppWindows(); |
179 DestroyRootWindow(); | 179 DestroyRootWindow(); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 if (displays.empty()) | 354 if (displays.empty()) |
355 return gfx::Size(); | 355 return gfx::Size(); |
356 const ui::DisplayMode* mode = displays[0].display->current_mode(); | 356 const ui::DisplayMode* mode = displays[0].display->current_mode(); |
357 return mode ? mode->size() : gfx::Size(); | 357 return mode ? mode->size() : gfx::Size(); |
358 #else | 358 #else |
359 return gfx::Size(); | 359 return gfx::Size(); |
360 #endif | 360 #endif |
361 } | 361 } |
362 | 362 |
363 } // namespace extensions | 363 } // namespace extensions |
OLD | NEW |