| 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 "ash/host/ash_window_tree_host.h" | 5 #include "ash/host/ash_window_tree_host.h" |
| 6 | 6 |
| 7 #include "ash/ash_export.h" | 7 #include "ash/ash_export.h" |
| 8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
| 9 #include "ash/host/ash_remote_window_tree_host_win.h" | 9 #include "ash/host/ash_remote_window_tree_host_win.h" |
| 10 #include "ash/host/ash_window_tree_host_init_params.h" |
| 10 #include "ash/host/root_window_transformer.h" | 11 #include "ash/host/root_window_transformer.h" |
| 11 #include "ash/host/transformer_helper.h" | 12 #include "ash/host/transformer_helper.h" |
| 12 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 13 #include "base/win/windows_version.h" | 14 #include "base/win/windows_version.h" |
| 14 #include "ui/aura/window_tree_host_win.h" | 15 #include "ui/aura/window_tree_host_win.h" |
| 15 #include "ui/gfx/geometry/insets.h" | 16 #include "ui/gfx/geometry/insets.h" |
| 16 #include "ui/gfx/transform.h" | 17 #include "ui/gfx/transform.h" |
| 17 | 18 |
| 18 namespace ash { | 19 namespace ash { |
| 19 namespace { | 20 namespace { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 DWORD saved_window_style_; | 104 DWORD saved_window_style_; |
| 104 DWORD saved_window_ex_style_; | 105 DWORD saved_window_ex_style_; |
| 105 | 106 |
| 106 TransformerHelper transformer_helper_; | 107 TransformerHelper transformer_helper_; |
| 107 | 108 |
| 108 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostWin); | 109 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostWin); |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 } // namespace | 112 } // namespace |
| 112 | 113 |
| 113 AshWindowTreeHost* AshWindowTreeHost::Create(const gfx::Rect& initial_bounds) { | 114 AshWindowTreeHost* AshWindowTreeHost::Create( |
| 115 const AshWindowTreeHostInitParams& init_params) { |
| 114 if (base::win::GetVersion() >= base::win::VERSION_WIN7 && | 116 if (base::win::GetVersion() >= base::win::VERSION_WIN7 && |
| 115 !CommandLine::ForCurrentProcess()->HasSwitch( | 117 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 116 ash::switches::kForceAshToDesktop)) | 118 ash::switches::kForceAshToDesktop)) |
| 117 return AshRemoteWindowTreeHostWin::GetInstance(); | 119 return new AshRemoteWindowTreeHostWin(init_params.remote_hwnd); |
| 118 | 120 |
| 119 return new AshWindowTreeHostWin(initial_bounds); | 121 return new AshWindowTreeHostWin(init_params.initial_bounds); |
| 120 } | 122 } |
| 121 | 123 |
| 122 } // namespace ash | 124 } // namespace ash |
| OLD | NEW |