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 "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" | 5 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" |
6 | 6 |
7 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h" | 7 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h" |
8 #include "chrome/browser/ui/views/chrome_views_delegate.h" | 8 #include "chrome/browser/ui/views/chrome_views_delegate.h" |
9 #include "components/constrained_window/constrained_window_views.h" | 9 #include "components/constrained_window/constrained_window_views.h" |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 views_delegate_.reset(new ChromeViewsDelegate); | 46 views_delegate_.reset(new ChromeViewsDelegate); |
47 | 47 |
48 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); | 48 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); |
49 | 49 |
50 #if defined(USE_AURA) | 50 #if defined(USE_AURA) |
51 wm_state_.reset(new wm::WMState); | 51 wm_state_.reset(new wm::WMState); |
52 #endif | 52 #endif |
53 } | 53 } |
54 | 54 |
55 void ChromeBrowserMainExtraPartsViews::PreCreateThreads() { | 55 void ChromeBrowserMainExtraPartsViews::PreCreateThreads() { |
56 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | 56 #if defined(USE_AURA) && !defined(OS_CHROMEOS) && !defined(USE_OZONE) |
57 // The screen may have already been set in test initialization. | 57 // The screen may have already been set in test initialization. |
58 if (!display::Screen::GetScreen()) | 58 if (!display::Screen::GetScreen()) |
59 display::Screen::SetScreenInstance(views::CreateDesktopScreen()); | 59 display::Screen::SetScreenInstance(views::CreateDesktopScreen()); |
60 #endif | 60 #endif |
61 } | 61 } |
62 | 62 |
63 void ChromeBrowserMainExtraPartsViews::PreProfileInit() { | 63 void ChromeBrowserMainExtraPartsViews::PreProfileInit() { |
64 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 64 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
65 // On the Linux desktop, we want to prevent the user from logging in as root, | 65 // On the Linux desktop, we want to prevent the user from logging in as root, |
66 // so that we don't destroy the profile. Now that we have some minimal ui | 66 // so that we don't destroy the profile. Now that we have some minimal ui |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 connection->GetConnector()->ConnectToInterface("service:ui", &server); | 104 connection->GetConnector()->ConnectToInterface("service:ui", &server); |
105 input_device_client_->Connect(std::move(server)); | 105 input_device_client_->Connect(std::move(server)); |
106 | 106 |
107 window_manager_connection_ = views::WindowManagerConnection::Create( | 107 window_manager_connection_ = views::WindowManagerConnection::Create( |
108 connection->GetConnector(), connection->GetIdentity(), | 108 connection->GetConnector(), connection->GetIdentity(), |
109 content::BrowserThread::GetTaskRunnerForThread( | 109 content::BrowserThread::GetTaskRunnerForThread( |
110 content::BrowserThread::IO)); | 110 content::BrowserThread::IO)); |
111 } | 111 } |
112 #endif // defined(USE_AURA) | 112 #endif // defined(USE_AURA) |
113 } | 113 } |
OLD | NEW |