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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder_helper.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more vector use fixes Created 8 years, 1 month 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser_plugin/browser_plugin_embedder_helper.h" 5 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h"
6 6
7 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 7 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
8 #include "content/browser/renderer_host/render_view_host_impl.h" 8 #include "content/browser/renderer_host/render_view_host_impl.h"
9 #include "content/common/browser_plugin_messages.h" 9 #include "content/common/browser_plugin_messages.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 const gfx::Rect* guest_rect = 86 const gfx::Rect* guest_rect =
87 reinterpret_cast<const gfx::Rect*>(guest_rect_data); 87 reinterpret_cast<const gfx::Rect*>(guest_rect_data);
88 const WebKit::WebInputEvent* input_event = 88 const WebKit::WebInputEvent* input_event =
89 reinterpret_cast<const WebKit::WebInputEvent*>(input_event_data); 89 reinterpret_cast<const WebKit::WebInputEvent*>(input_event_data);
90 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( 90 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>(
91 render_view_host()); 91 render_view_host());
92 92
93 // Convert the window coordinates into screen coordinates. 93 // Convert the window coordinates into screen coordinates.
94 gfx::Rect guest_screen_rect(*guest_rect); 94 gfx::Rect guest_screen_rect(*guest_rect);
95 if (rvh->GetView()) 95 if (rvh->GetView())
Peter Kasting 2012/10/30 01:14:14 Nit: {}
96 guest_screen_rect.Offset(rvh->GetView()->GetViewBounds().origin()); 96 guest_screen_rect.Offset(
97 rvh->GetView()->GetViewBounds().OffsetFromOrigin());
97 98
98 IPC::Message* reply_message = 99 IPC::Message* reply_message =
99 IPC::SyncMessage::GenerateReply(&message); 100 IPC::SyncMessage::GenerateReply(&message);
100 embedder_->HandleInputEvent(instance_id, 101 embedder_->HandleInputEvent(instance_id,
101 rvh, 102 rvh,
102 guest_screen_rect, 103 guest_screen_rect,
103 *input_event, 104 *input_event,
104 reply_message); 105 reply_message);
105 } 106 }
106 107
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 int instance_id, 169 int instance_id,
169 WebKit::WebDragStatus drag_status, 170 WebKit::WebDragStatus drag_status,
170 const WebDropData& drop_data, 171 const WebDropData& drop_data,
171 WebKit::WebDragOperationsMask drag_mask, 172 WebKit::WebDragOperationsMask drag_mask,
172 const gfx::Point& location) { 173 const gfx::Point& location) {
173 embedder_->DragStatusUpdate(instance_id, drag_status, drop_data, drag_mask, 174 embedder_->DragStatusUpdate(instance_id, drag_status, drop_data, drag_mask,
174 location); 175 location);
175 } 176 }
176 177
177 } // namespace content 178 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698