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

Side by Side Diff: content/browser/renderer_host/render_widget_resize_helper.cc

Issue 1513053002: WIP - Gutterless resize on Windows Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 5 years 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
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 "content/browser/renderer_host/render_widget_resize_helper_mac.h" 5 #include "content/browser/renderer_host/render_widget_resize_helper.h"
6 6
7 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 7 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" 9 #include "ui/base/window_resize_helper.h"
10 10
11 namespace content { 11 namespace content {
12 namespace { 12 namespace {
13 13
14 void HandleGpuIPC(int gpu_host_id, const IPC::Message& message) { 14 void HandleGpuIPC(int gpu_host_id, const IPC::Message& message) {
15 GpuProcessHostUIShim* host = GpuProcessHostUIShim::FromID(gpu_host_id); 15 GpuProcessHostUIShim* host = GpuProcessHostUIShim::FromID(gpu_host_id);
16 if (host) 16 if (host)
17 host->OnMessageReceived(message); 17 host->OnMessageReceived(message);
18 } 18 }
19 19
20 void HandleRendererIPC(int render_process_id, const IPC::Message& message) { 20 void HandleRendererIPC(int render_process_id, const IPC::Message& message) {
21 RenderProcessHost* host = RenderProcessHost::FromID(render_process_id); 21 RenderProcessHost* host = RenderProcessHost::FromID(render_process_id);
22 if (host) 22 if (host)
23 host->OnMessageReceived(message); 23 host->OnMessageReceived(message);
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 //////////////////////////////////////////////////////////////////////////////// 28 ////////////////////////////////////////////////////////////////////////////////
29 // RenderWidgetResizeHelper 29 // RenderWidgetResizeHelper
30 30
31 // static 31 // static
32 void RenderWidgetResizeHelper::PostRendererProcessMsg(int render_process_id, 32 void RenderWidgetResizeHelper::PostRendererProcessMsg(int render_process_id,
33 const IPC::Message& msg) { 33 const IPC::Message& msg) {
34 ui::WindowResizeHelperMac::Get()->task_runner()->PostDelayedTask( 34 ui::WindowResizeHelper::Get()->task_runner()->PostDelayedTask(
35 FROM_HERE, base::Bind(HandleRendererIPC, render_process_id, msg), 35 FROM_HERE, base::Bind(HandleRendererIPC, render_process_id, msg),
36 base::TimeDelta()); 36 base::TimeDelta());
37 } 37 }
38 38
39 // static 39 // static
40 void RenderWidgetResizeHelper::PostGpuProcessMsg(int gpu_host_id, 40 void RenderWidgetResizeHelper::PostGpuProcessMsg(int gpu_host_id,
41 const IPC::Message& msg) { 41 const IPC::Message& msg) {
42 ui::WindowResizeHelperMac::Get()->task_runner()->PostDelayedTask( 42 ui::WindowResizeHelper::Get()->task_runner()->PostDelayedTask(
43 FROM_HERE, base::Bind(HandleGpuIPC, gpu_host_id, msg), base::TimeDelta()); 43 FROM_HERE, base::Bind(HandleGpuIPC, gpu_host_id, msg), base::TimeDelta());
44 } 44 }
45 45
46 } // namespace content 46 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698