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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 ShellDesktopController* ShellDesktopController::instance() { | 180 ShellDesktopController* ShellDesktopController::instance() { |
181 return g_instance; | 181 return g_instance; |
182 } | 182 } |
183 | 183 |
184 void ShellDesktopController::SetAppWindowController( | 184 void ShellDesktopController::SetAppWindowController( |
185 ShellAppWindowController* app_window_controller) { | 185 ShellAppWindowController* app_window_controller) { |
186 app_window_controller_.reset(app_window_controller); | 186 app_window_controller_.reset(app_window_controller); |
187 } | 187 } |
188 | 188 |
189 ShellAppWindow* ShellDesktopController::CreateAppWindow( | 189 ShellAppWindow* ShellDesktopController::CreateAppWindow( |
190 content::BrowserContext* context) { | 190 content::BrowserContext* context, |
191 return app_window_controller_->CreateAppWindow(context); | 191 const Extension* extension) { |
| 192 return app_window_controller_->CreateAppWindow(context, extension); |
192 } | 193 } |
193 | 194 |
194 void ShellDesktopController::CloseAppWindows() { | 195 void ShellDesktopController::CloseAppWindows() { |
195 if (app_window_controller_) | 196 if (app_window_controller_) |
196 app_window_controller_->CloseAppWindows(); | 197 app_window_controller_->CloseAppWindows(); |
197 } | 198 } |
198 | 199 |
199 void ShellDesktopController::SetDisplayWorkAreaInsets( | 200 void ShellDesktopController::SetDisplayWorkAreaInsets( |
200 const gfx::Insets& insets) { | 201 const gfx::Insets& insets) { |
201 test_screen_->SetWorkAreaInsets(insets); | 202 test_screen_->SetWorkAreaInsets(insets); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 if (displays.empty()) | 333 if (displays.empty()) |
333 return gfx::Size(); | 334 return gfx::Size(); |
334 const ui::DisplayMode* mode = displays[0].display->current_mode(); | 335 const ui::DisplayMode* mode = displays[0].display->current_mode(); |
335 return mode ? mode->size() : gfx::Size(); | 336 return mode ? mode->size() : gfx::Size(); |
336 #else | 337 #else |
337 return gfx::Size(); | 338 return gfx::Size(); |
338 #endif | 339 #endif |
339 } | 340 } |
340 | 341 |
341 } // namespace extensions | 342 } // namespace extensions |
OLD | NEW |