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

Side by Side Diff: ui/ozone/platform/dri/native_window_delegate_impl.cc

Issue 479713002: [Ozone-GBM] Adding NativeWindowDelegate to IPC window changes to the GPU (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/ozone/platform/dri/native_window_delegate_impl.h"
6
7 #include "ui/ozone/platform/dri/native_window_manager.h"
8 #include "ui/ozone/platform/dri/screen_manager.h"
9
10 namespace ui {
11
12 NativeWindowDelegateImpl::NativeWindowDelegateImpl(
13 gfx::AcceleratedWidget widget,
14 NativeWindowManager* window_manager,
15 ScreenManager* screen_manager)
16 : widget_(widget),
17 window_manager_(window_manager),
18 screen_manager_(screen_manager) {
19 window_manager_->AddNativeWindowDelegate(widget_, this);
20 }
21
22 NativeWindowDelegateImpl::~NativeWindowDelegateImpl() {
23 window_manager_->RemoveNativeWindowDelegate(widget_);
24 }
25
26 gfx::AcceleratedWidget NativeWindowDelegateImpl::GetWidget() {
27 return widget_;
28 }
29
30 HardwareDisplayController* NativeWindowDelegateImpl::GetController() {
31 return controller_.get();
32 }
33
34 void NativeWindowDelegateImpl::OnBoundsChanged(const gfx::Rect& bounds) {
35 controller_ = screen_manager_->GetDisplayController(bounds);
36 }
37
38 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698