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

Side by Side Diff: chrome/browser/renderer_host/resource_message_filter_win.cc

Issue 67145: Linux: move X operations from the IO to UI2 thread. (Closed)
Patch Set: ... Created 11 years, 8 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 | « chrome/browser/renderer_host/resource_message_filter_mac.mm ('k') | chrome/common/x11_util.h » ('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 (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/renderer_host/resource_message_filter.h" 5 #include "chrome/browser/renderer_host/resource_message_filter.h"
6 #include "chrome/common/render_messages.h"
6 7
7 // We get null window_ids passed into the two functions below; please see 8 // We get null window_ids passed into the two functions below; please see
8 // http://crbug.com/9060 for more details. 9 // http://crbug.com/9060 for more details.
9 10
10 void ResourceMessageFilter::OnGetWindowRect(gfx::NativeViewId window_id, 11 void ResourceMessageFilter::OnGetWindowRect(gfx::NativeViewId window_id,
11 gfx::Rect* rect) { 12 IPC::Message* reply_msg) {
12 HWND window = gfx::NativeViewFromId(window_id); 13 HWND window = gfx::NativeViewFromId(window_id);
13 RECT window_rect = {0}; 14 RECT window_rect = {0};
14 GetWindowRect(window, &window_rect); 15 GetWindowRect(window, &window_rect);
15 *rect = window_rect; 16 gfx::Rect rect(window_rect);
17
18 ViewHostMsg_GetWindowRect::WriteReplyParams(reply_msg, rect);
19 Send(reply_msg);
16 } 20 }
17 21
18 void ResourceMessageFilter::OnGetRootWindowRect(gfx::NativeViewId window_id, 22 void ResourceMessageFilter::OnGetRootWindowRect(gfx::NativeViewId window_id,
19 gfx::Rect* rect) { 23 IPC::Message* reply_msg) {
20 HWND window = gfx::NativeViewFromId(window_id); 24 HWND window = gfx::NativeViewFromId(window_id);
21 RECT window_rect = {0}; 25 RECT window_rect = {0};
22 HWND root_window = ::GetAncestor(window, GA_ROOT); 26 HWND root_window = ::GetAncestor(window, GA_ROOT);
23 GetWindowRect(root_window, &window_rect); 27 GetWindowRect(root_window, &window_rect);
24 *rect = window_rect; 28 gfx::Rect rect(window_rect);
29
30 ViewHostMsg_GetRootWindowRect::WriteReplyParams(reply_msg, rect);
31 Send(reply_msg);
25 } 32 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter_mac.mm ('k') | chrome/common/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698