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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.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: remove SizeOfVector 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_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h" 10 #include "content/browser/browser_plugin/browser_plugin_guest_helper.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 void BrowserPluginGuest::SetFocus(bool focused) { 362 void BrowserPluginGuest::SetFocus(bool focused) {
363 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost(); 363 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost();
364 render_view_host->Send( 364 render_view_host->Send(
365 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused)); 365 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused));
366 } 366 }
367 367
368 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host, 368 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host,
369 int route_id, 369 int route_id,
370 const gfx::Rect& initial_pos) { 370 const gfx::Rect& initial_pos) {
371 gfx::Rect screen_pos(initial_pos); 371 gfx::Rect screen_pos(initial_pos);
372 screen_pos.Offset(guest_rect_.origin()); 372 screen_pos.Offset(guest_rect_.DistanceFromOrigin());
373 static_cast<WebContentsImpl*>(web_contents())->ShowCreatedWidget(route_id, 373 static_cast<WebContentsImpl*>(web_contents())->ShowCreatedWidget(route_id,
374 screen_pos); 374 screen_pos);
375 } 375 }
376 376
377 void BrowserPluginGuest::SetCursor(const WebCursor& cursor) { 377 void BrowserPluginGuest::SetCursor(const WebCursor& cursor) {
378 cursor_ = cursor; 378 cursor_ = cursor;
379 } 379 }
380 380
381 void BrowserPluginGuest::DidStartProvisionalLoadForFrame( 381 void BrowserPluginGuest::DidStartProvisionalLoadForFrame(
382 int64 frame_id, 382 int64 frame_id,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 default: 474 default:
475 break; 475 break;
476 } 476 }
477 } 477 }
478 478
479 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { 479 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) {
480 embedder_web_contents_->GetRenderProcessHost()->Send(msg); 480 embedder_web_contents_->GetRenderProcessHost()->Send(msg);
481 } 481 }
482 482
483 } // namespace content 483 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698