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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 size = GetPrimaryDisplaySize(); | 314 size = GetPrimaryDisplaySize(); |
315 } | 315 } |
316 if (size.IsEmpty()) | 316 if (size.IsEmpty()) |
317 size = gfx::Size(1920, 1080); | 317 size = gfx::Size(1920, 1080); |
318 | 318 |
319 screen_.reset(new ShellScreen(size)); | 319 screen_.reset(new ShellScreen(size)); |
320 display::Screen::SetScreenInstance(screen_.get()); | 320 display::Screen::SetScreenInstance(screen_.get()); |
321 // TODO(mukai): Set up input method. | 321 // TODO(mukai): Set up input method. |
322 | 322 |
323 host_.reset(screen_->CreateHostForPrimaryDisplay()); | 323 host_.reset(screen_->CreateHostForPrimaryDisplay()); |
324 aura::client::SetWindowTreeClient(host_->window(), this); | 324 aura::client::SetWindowParentingClient(host_->window(), this); |
325 root_window_event_filter_.reset(new wm::CompoundEventFilter); | 325 root_window_event_filter_.reset(new wm::CompoundEventFilter); |
326 host_->window()->AddPreTargetHandler(root_window_event_filter_.get()); | 326 host_->window()->AddPreTargetHandler(root_window_event_filter_.get()); |
327 InitWindowManager(); | 327 InitWindowManager(); |
328 | 328 |
329 host_->AddObserver(this); | 329 host_->AddObserver(this); |
330 | 330 |
331 // Ensure the X window gets mapped. | 331 // Ensure the X window gets mapped. |
332 host_->Show(); | 332 host_->Show(); |
333 } | 333 } |
334 | 334 |
(...skipping 24 matching lines...) Expand all Loading... |
359 if (displays.empty()) | 359 if (displays.empty()) |
360 return gfx::Size(); | 360 return gfx::Size(); |
361 const ui::DisplayMode* mode = displays[0]->current_mode(); | 361 const ui::DisplayMode* mode = displays[0]->current_mode(); |
362 return mode ? mode->size() : gfx::Size(); | 362 return mode ? mode->size() : gfx::Size(); |
363 #else | 363 #else |
364 return gfx::Size(); | 364 return gfx::Size(); |
365 #endif | 365 #endif |
366 } | 366 } |
367 | 367 |
368 } // namespace extensions | 368 } // namespace extensions |
OLD | NEW |