OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/root_window_host_factory.h" | 5 #include "ash/host/root_window_host_factory.h" |
6 | 6 |
7 #include "base/win/windows_version.h" | 7 #include "base/win/windows_version.h" |
8 #include "ui/aura/remote_root_window_host_win.h" | 8 #include "ui/aura/remote_root_window_host_win.h" |
9 #include "ui/aura/root_window_host.h" | 9 #include "ui/aura/root_window_host.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory { | 13 class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory { |
14 public: | 14 public: |
15 RootWindowHostFactoryImpl() {} | 15 RootWindowHostFactoryImpl() {} |
16 | 16 |
17 // Overridden from RootWindowHostFactory: | 17 // Overridden from RootWindowHostFactory: |
18 virtual aura::RootWindowHost* CreateRootWindowHost( | 18 virtual aura::RootWindowHost* CreateRootWindowHost( |
19 const gfx::Rect& initial_bounds) OVERRIDE { | 19 const gfx::Rect& initial_bounds, |
| 20 bool is_internal_display) OVERRIDE { |
20 if (base::win::GetVersion() >= base::win::VERSION_WIN8) | 21 if (base::win::GetVersion() >= base::win::VERSION_WIN8) |
21 return aura::RemoteRootWindowHostWin::Create(initial_bounds); | 22 return aura::RemoteRootWindowHostWin::Create(initial_bounds, |
| 23 is_internal_display); |
22 | 24 |
23 return aura::RootWindowHost::Create(initial_bounds); | 25 return aura::RootWindowHost::Create(initial_bounds, is_internal_display); |
24 } | 26 } |
25 }; | 27 }; |
26 | 28 |
27 } | 29 } |
28 | 30 |
29 namespace ash { | 31 namespace ash { |
30 | 32 |
31 // static | 33 // static |
32 RootWindowHostFactory* RootWindowHostFactory::Create() { | 34 RootWindowHostFactory* RootWindowHostFactory::Create() { |
33 return new RootWindowHostFactoryImpl; | 35 return new RootWindowHostFactoryImpl; |
34 } | 36 } |
35 | 37 |
36 } // namespace ash | 38 } // namespace ash |
OLD | NEW |