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

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

Issue 981583005: [Ozone-Dri] Merge the DriWindowDelegate with the implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « ui/ozone/platform/dri/dri.gypi ('k') | ui/ozone/platform/dri/dri_surface.cc » ('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 2014 The Chromium Authors. All rights reserved. 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 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 "ui/ozone/platform/dri/dri_gpu_platform_support.h" 5 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "ipc/ipc_message_macros.h" 9 #include "ipc/ipc_message_macros.h"
10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" 10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
11 #include "ui/ozone/common/gpu/ozone_gpu_messages.h" 11 #include "ui/ozone/common/gpu/ozone_gpu_messages.h"
12 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h" 12 #include "ui/ozone/platform/dri/dri_window_delegate.h"
13 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h" 13 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h"
14 #include "ui/ozone/platform/dri/drm_device.h" 14 #include "ui/ozone/platform/dri/drm_device.h"
15 #include "ui/ozone/platform/dri/native_display_delegate_dri.h" 15 #include "ui/ozone/platform/dri/native_display_delegate_dri.h"
16 16
17 namespace ui { 17 namespace ui {
18 18
19 namespace { 19 namespace {
20 20
21 void MessageProcessedOnMain( 21 void MessageProcessedOnMain(
22 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, 22 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 for (size_t i = 0; i < handlers_.size(); ++i) 222 for (size_t i = 0; i < handlers_.size(); ++i)
223 if (handlers_[i]->OnMessageReceived(message)) 223 if (handlers_[i]->OnMessageReceived(message))
224 return true; 224 return true;
225 225
226 return false; 226 return false;
227 } 227 }
228 228
229 void DriGpuPlatformSupport::OnCreateWindowDelegate( 229 void DriGpuPlatformSupport::OnCreateWindowDelegate(
230 gfx::AcceleratedWidget widget) { 230 gfx::AcceleratedWidget widget) {
231 scoped_ptr<DriWindowDelegate> delegate( 231 scoped_ptr<DriWindowDelegate> delegate(
232 new DriWindowDelegateImpl(widget, drm_device_manager_, screen_manager_)); 232 new DriWindowDelegate(widget, drm_device_manager_, screen_manager_));
233 delegate->Initialize(); 233 delegate->Initialize();
234 window_manager_->AddWindowDelegate(widget, delegate.Pass()); 234 window_manager_->AddWindowDelegate(widget, delegate.Pass());
235 } 235 }
236 236
237 void DriGpuPlatformSupport::OnDestroyWindowDelegate( 237 void DriGpuPlatformSupport::OnDestroyWindowDelegate(
238 gfx::AcceleratedWidget widget) { 238 gfx::AcceleratedWidget widget) {
239 scoped_ptr<DriWindowDelegate> delegate = 239 scoped_ptr<DriWindowDelegate> delegate =
240 window_manager_->RemoveWindowDelegate(widget); 240 window_manager_->RemoveWindowDelegate(widget);
241 delegate->Shutdown(); 241 delegate->Shutdown();
242 } 242 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 void DriGpuPlatformSupport::SetIOTaskRunner( 302 void DriGpuPlatformSupport::SetIOTaskRunner(
303 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { 303 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) {
304 ndd_->InitializeIOTaskRunner(io_task_runner); 304 ndd_->InitializeIOTaskRunner(io_task_runner);
305 } 305 }
306 306
307 IPC::MessageFilter* DriGpuPlatformSupport::GetMessageFilter() { 307 IPC::MessageFilter* DriGpuPlatformSupport::GetMessageFilter() {
308 return filter_.get(); 308 return filter_.get();
309 } 309 }
310 310
311 } // namespace ui 311 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri.gypi ('k') | ui/ozone/platform/dri/dri_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698