| 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.h" | 5 #include "extensions/shell/browser/shell_desktop_controller.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/public/browser/context_factory.h" | 8 #include "content/public/browser/context_factory.h" |
| 9 #include "extensions/shell/browser/shell_app_window_controller.h" | 9 #include "extensions/shell/browser/shell_app_window_controller.h" |
| 10 #include "extensions/shell/common/switches.h" | 10 #include "extensions/shell/common/switches.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 ShellAppWindow* ShellDesktopController::CreateAppWindow( | 189 ShellAppWindow* ShellDesktopController::CreateAppWindow( |
| 190 content::BrowserContext* context) { | 190 content::BrowserContext* context) { |
| 191 return app_window_controller_->CreateAppWindow(context); | 191 return app_window_controller_->CreateAppWindow(context); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void ShellDesktopController::CloseAppWindows() { | 194 void ShellDesktopController::CloseAppWindows() { |
| 195 if (app_window_controller_) | 195 if (app_window_controller_) |
| 196 app_window_controller_->CloseAppWindows(); | 196 app_window_controller_->CloseAppWindows(); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void ShellDesktopController::SetDisplayWorkAreaInsets( |
| 200 const gfx::Insets& insets) { |
| 201 test_screen_->SetWorkAreaInsets(insets); |
| 202 } |
| 203 |
| 199 aura::Window* ShellDesktopController::GetDefaultParent( | 204 aura::Window* ShellDesktopController::GetDefaultParent( |
| 200 aura::Window* context, | 205 aura::Window* context, |
| 201 aura::Window* window, | 206 aura::Window* window, |
| 202 const gfx::Rect& bounds) { | 207 const gfx::Rect& bounds) { |
| 203 return host_->window(); | 208 return host_->window(); |
| 204 } | 209 } |
| 205 | 210 |
| 206 #if defined(OS_CHROMEOS) | 211 #if defined(OS_CHROMEOS) |
| 207 void ShellDesktopController::OnDisplayModeChanged( | 212 void ShellDesktopController::OnDisplayModeChanged( |
| 208 const std::vector<ui::DisplayConfigurator::DisplayState>& displays) { | 213 const std::vector<ui::DisplayConfigurator::DisplayState>& displays) { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 if (displays.empty()) | 332 if (displays.empty()) |
| 328 return gfx::Size(); | 333 return gfx::Size(); |
| 329 const ui::DisplayMode* mode = displays[0].display->current_mode(); | 334 const ui::DisplayMode* mode = displays[0].display->current_mode(); |
| 330 return mode ? mode->size() : gfx::Size(); | 335 return mode ? mode->size() : gfx::Size(); |
| 331 #else | 336 #else |
| 332 return gfx::Size(); | 337 return gfx::Size(); |
| 333 #endif | 338 #endif |
| 334 } | 339 } |
| 335 | 340 |
| 336 } // namespace extensions | 341 } // namespace extensions |
| OLD | NEW |