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

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: RenderText fixup 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()) {
96 guest_screen_rect.Offset(rvh->GetView()->GetViewBounds().origin()); 96 guest_screen_rect.Offset(
97 rvh->GetView()->GetViewBounds().OffsetFromOrigin());
98 }
97 99
98 IPC::Message* reply_message = 100 IPC::Message* reply_message =
99 IPC::SyncMessage::GenerateReply(&message); 101 IPC::SyncMessage::GenerateReply(&message);
100 embedder_->HandleInputEvent(instance_id, 102 embedder_->HandleInputEvent(instance_id,
101 rvh, 103 rvh,
102 guest_screen_rect, 104 guest_screen_rect,
103 *input_event, 105 *input_event,
104 reply_message); 106 reply_message);
105 } 107 }
106 108
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 int instance_id, 172 int instance_id,
171 WebKit::WebDragStatus drag_status, 173 WebKit::WebDragStatus drag_status,
172 const WebDropData& drop_data, 174 const WebDropData& drop_data,
173 WebKit::WebDragOperationsMask drag_mask, 175 WebKit::WebDragOperationsMask drag_mask,
174 const gfx::Point& location) { 176 const gfx::Point& location) {
175 embedder_->DragStatusUpdate(instance_id, drag_status, drop_data, drag_mask, 177 embedder_->DragStatusUpdate(instance_id, drag_status, drop_data, drag_mask,
176 location); 178 location);
177 } 179 }
178 180
179 } // namespace content 181 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698