| 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 "content/shell/browser/shell_platform_data_aura.h" | 5 #include "content/shell/browser/shell_platform_data_aura.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "content/shell/browser/shell.h" | 8 #include "content/shell/browser/shell.h" |
| 9 #include "ui/aura/client/default_capture_client.h" | 9 #include "ui/aura/client/default_capture_client.h" |
| 10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } | 58 } |
| 59 | 59 |
| 60 ShellPlatformDataAura* Shell::platform_ = NULL; | 60 ShellPlatformDataAura* Shell::platform_ = NULL; |
| 61 | 61 |
| 62 ShellPlatformDataAura::ShellPlatformDataAura(const gfx::Size& initial_size) { | 62 ShellPlatformDataAura::ShellPlatformDataAura(const gfx::Size& initial_size) { |
| 63 CHECK(aura::Env::GetInstance()); | 63 CHECK(aura::Env::GetInstance()); |
| 64 host_.reset(aura::WindowTreeHost::Create(gfx::Rect(initial_size))); | 64 host_.reset(aura::WindowTreeHost::Create(gfx::Rect(initial_size))); |
| 65 host_->InitHost(); | 65 host_->InitHost(); |
| 66 host_->window()->Show(); |
| 66 host_->window()->SetLayoutManager(new FillLayout(host_->window())); | 67 host_->window()->SetLayoutManager(new FillLayout(host_->window())); |
| 67 | 68 |
| 68 focus_client_.reset(new aura::test::TestFocusClient()); | 69 focus_client_.reset(new aura::test::TestFocusClient()); |
| 69 aura::client::SetFocusClient(host_->window(), focus_client_.get()); | 70 aura::client::SetFocusClient(host_->window(), focus_client_.get()); |
| 70 | 71 |
| 71 new wm::DefaultActivationClient(host_->window()); | 72 new wm::DefaultActivationClient(host_->window()); |
| 72 capture_client_.reset( | 73 capture_client_.reset( |
| 73 new aura::client::DefaultCaptureClient(host_->window())); | 74 new aura::client::DefaultCaptureClient(host_->window())); |
| 74 window_parenting_client_.reset( | 75 window_parenting_client_.reset( |
| 75 new aura::test::TestWindowParentingClient(host_->window())); | 76 new aura::test::TestWindowParentingClient(host_->window())); |
| 76 } | 77 } |
| 77 | 78 |
| 78 ShellPlatformDataAura::~ShellPlatformDataAura() { | 79 ShellPlatformDataAura::~ShellPlatformDataAura() { |
| 79 } | 80 } |
| 80 | 81 |
| 81 void ShellPlatformDataAura::ShowWindow() { | 82 void ShellPlatformDataAura::ShowWindow() { |
| 82 host_->Show(); | 83 host_->Show(); |
| 83 } | 84 } |
| 84 | 85 |
| 85 void ShellPlatformDataAura::ResizeWindow(const gfx::Size& size) { | 86 void ShellPlatformDataAura::ResizeWindow(const gfx::Size& size) { |
| 86 host_->SetBoundsInPixels(gfx::Rect(size)); | 87 host_->SetBoundsInPixels(gfx::Rect(size)); |
| 87 } | 88 } |
| 88 | 89 |
| 89 } // namespace content | 90 } // namespace content |
| OLD | NEW |