Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: services/ui/ws/platform_display_default.cc

Issue 2665193002: Fix aura_unittests for Ozone X11. (Closed)
Patch Set: Pass initial bounds into X11Window/X11WindowOzone. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | testing/buildbot/chromium.chromiumos.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/ws/platform_display_default.h" 5 #include "services/ui/ws/platform_display_default.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "gpu/ipc/client/gpu_channel_host.h" 8 #include "gpu/ipc/client/gpu_channel_host.h"
9 #include "services/ui/display/screen_manager.h" 9 #include "services/ui/display/screen_manager.h"
10 #include "services/ui/ws/platform_display_init_params.h" 10 #include "services/ui/ws/platform_display_init_params.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 delegate_ = delegate; 57 delegate_ = delegate;
58 58
59 DCHECK(!metrics_.pixel_size.IsEmpty()); 59 DCHECK(!metrics_.pixel_size.IsEmpty());
60 60
61 // TODO(kylechar): The origin here isn't right if any displays have 61 // TODO(kylechar): The origin here isn't right if any displays have
62 // scale_factor other than 1.0 but will prevent windows from being stacked. 62 // scale_factor other than 1.0 but will prevent windows from being stacked.
63 gfx::Rect bounds(metrics_.bounds.origin(), metrics_.pixel_size); 63 gfx::Rect bounds(metrics_.bounds.origin(), metrics_.pixel_size);
64 #if defined(OS_WIN) 64 #if defined(OS_WIN)
65 platform_window_ = base::MakeUnique<ui::WinWindow>(this, bounds); 65 platform_window_ = base::MakeUnique<ui::WinWindow>(this, bounds);
66 #elif defined(USE_X11) && !defined(OS_CHROMEOS) 66 #elif defined(USE_X11) && !defined(OS_CHROMEOS)
67 platform_window_ = base::MakeUnique<ui::X11Window>(this); 67 platform_window_ = base::MakeUnique<ui::X11Window>(this, bounds);
68 platform_window_->SetBounds(bounds);
69 #elif defined(OS_ANDROID) 68 #elif defined(OS_ANDROID)
70 platform_window_ = base::MakeUnique<ui::PlatformWindowAndroid>(this); 69 platform_window_ = base::MakeUnique<ui::PlatformWindowAndroid>(this);
71 platform_window_->SetBounds(bounds); 70 platform_window_->SetBounds(bounds);
72 #elif defined(USE_OZONE) 71 #elif defined(USE_OZONE)
73 platform_window_ = 72 platform_window_ =
74 ui::OzonePlatform::GetInstance()->CreatePlatformWindow(this, bounds); 73 ui::OzonePlatform::GetInstance()->CreatePlatformWindow(this, bounds);
75 #else 74 #else
76 NOTREACHED() << "Unsupported platform"; 75 NOTREACHED() << "Unsupported platform";
77 #endif 76 #endif
78 77
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 253 }
255 254
256 void PlatformDisplayDefault::OnActivationChanged(bool active) {} 255 void PlatformDisplayDefault::OnActivationChanged(bool active) {}
257 256
258 bool PlatformDisplayDefault::IsInHighContrastMode() { 257 bool PlatformDisplayDefault::IsInHighContrastMode() {
259 return delegate_ ? delegate_->IsInHighContrastMode() : false; 258 return delegate_ ? delegate_->IsInHighContrastMode() : false;
260 } 259 }
261 260
262 } // namespace ws 261 } // namespace ws
263 } // namespace ui 262 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | testing/buildbot/chromium.chromiumos.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698