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_window_tree_host_init_params.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 "ash/ime/input_method_event_handler.h" | 13 #include "ash/ime/input_method_event_handler.h" |
13 #include "base/command_line.h" | 14 #include "base/command_line.h" |
14 #include "base/win/windows_version.h" | 15 #include "base/win/windows_version.h" |
15 #include "ui/aura/window_tree_host_platform.h" | 16 #include "ui/aura/window_tree_host_platform.h" |
16 #include "ui/events/event_processor.h" | 17 #include "ui/events/event_processor.h" |
17 #include "ui/gfx/geometry/insets.h" | 18 #include "ui/gfx/geometry/insets.h" |
18 #include "ui/gfx/transform.h" | 19 #include "ui/gfx/transform.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 116 |
116 TransformerHelper transformer_helper_; | 117 TransformerHelper transformer_helper_; |
117 | 118 |
118 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostWin); | 119 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostWin); |
119 }; | 120 }; |
120 | 121 |
121 } // namespace | 122 } // namespace |
122 | 123 |
123 AshWindowTreeHost* AshWindowTreeHost::Create( | 124 AshWindowTreeHost* AshWindowTreeHost::Create( |
124 const AshWindowTreeHostInitParams& init_params) { | 125 const AshWindowTreeHostInitParams& init_params) { |
| 126 if (base::win::GetVersion() >= base::win::VERSION_WIN7 && |
| 127 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 128 ash::switches::kForceAshToDesktop)) |
| 129 return new AshRemoteWindowTreeHostWin(init_params.remote_hwnd); |
| 130 |
125 return new AshWindowTreeHostWin(init_params.initial_bounds); | 131 return new AshWindowTreeHostWin(init_params.initial_bounds); |
126 } | 132 } |
127 | 133 |
128 } // namespace ash | 134 } // namespace ash |
OLD | NEW |