| 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 "apps/shell/browser/shell_desktop_controller.h" | 5 #include "apps/shell/browser/shell_desktop_controller.h" |
| 6 | 6 |
| 7 #include "apps/shell/browser/shell_app_window_controller.h" | 7 #include "apps/shell/browser/shell_app_window_controller.h" |
| 8 #include "content/public/browser/context_factory.h" | 8 #include "content/public/browser/context_factory.h" |
| 9 #include "ui/aura/client/cursor_client.h" | 9 #include "ui/aura/client/cursor_client.h" |
| 10 #include "ui/aura/client/default_capture_client.h" | 10 #include "ui/aura/client/default_capture_client.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 void ShellDesktopController::CreateRootWindow() { | 226 void ShellDesktopController::CreateRootWindow() { |
| 227 test_screen_.reset(aura::TestScreen::Create()); | 227 test_screen_.reset(aura::TestScreen::Create()); |
| 228 // TODO(jamescook): Replace this with a real Screen implementation. | 228 // TODO(jamescook): Replace this with a real Screen implementation. |
| 229 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_.get()); | 229 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_.get()); |
| 230 // TODO(mukai): Set up input method. | 230 // TODO(mukai): Set up input method. |
| 231 | 231 |
| 232 // Set up basic pieces of ui::wm. | 232 // Set up basic pieces of ui::wm. |
| 233 gfx::Size size = GetPrimaryDisplaySize(); | 233 gfx::Size size = GetPrimaryDisplaySize(); |
| 234 if (size.IsEmpty()) | 234 if (size.IsEmpty()) |
| 235 size = gfx::Size(1366, 768); | 235 size = gfx::Size(1280, 720); |
| 236 | 236 |
| 237 host_.reset(aura::WindowTreeHost::Create(gfx::Rect(size))); | 237 host_.reset(aura::WindowTreeHost::Create(gfx::Rect(size))); |
| 238 host_->InitHost(); | 238 host_->InitHost(); |
| 239 aura::client::SetWindowTreeClient(host_->window(), this); | 239 aura::client::SetWindowTreeClient(host_->window(), this); |
| 240 root_window_event_filter_.reset(new wm::CompoundEventFilter); | 240 root_window_event_filter_.reset(new wm::CompoundEventFilter); |
| 241 host_->window()->AddPreTargetHandler(root_window_event_filter_.get()); | 241 host_->window()->AddPreTargetHandler(root_window_event_filter_.get()); |
| 242 InitWindowManager(); | 242 InitWindowManager(); |
| 243 | 243 |
| 244 host_->AddObserver(this); | 244 host_->AddObserver(this); |
| 245 | 245 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 if (displays.empty()) | 316 if (displays.empty()) |
| 317 return gfx::Size(); | 317 return gfx::Size(); |
| 318 const ui::DisplayMode* mode = displays[0].display->current_mode(); | 318 const ui::DisplayMode* mode = displays[0].display->current_mode(); |
| 319 return mode ? mode->size() : gfx::Size(); | 319 return mode ? mode->size() : gfx::Size(); |
| 320 #else | 320 #else |
| 321 return gfx::Size(); | 321 return gfx::Size(); |
| 322 #endif | 322 #endif |
| 323 } | 323 } |
| 324 | 324 |
| 325 } // namespace apps | 325 } // namespace apps |
| OLD | NEW |