• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 
5 #include "tests/cefclient/browser/root_window.h"
6 
7 #include "tests/cefclient/browser/root_window_views.h"
8 
9 #if defined(OS_WIN)
10 #include "tests/cefclient/browser/root_window_win.h"
11 #elif defined(OS_LINUX)
12 #include "tests/cefclient/browser/root_window_gtk.h"
13 #elif defined(OS_MAC)
14 #include "tests/cefclient/browser/root_window_mac.h"
15 #endif
16 
17 namespace client {
18 
19 // static
Create(bool use_views)20 scoped_refptr<RootWindow> RootWindow::Create(bool use_views) {
21   if (use_views) {
22     return new RootWindowViews();
23   }
24 
25 #if defined(OS_WIN)
26   return new RootWindowWin();
27 #elif defined(OS_LINUX)
28   return new RootWindowGtk();
29 #elif defined(OS_MAC)
30   return new RootWindowMac();
31 #else
32 #error Unsupported platform
33 #endif
34 }
35 
36 }  // namespace client
37