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

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: 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_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_embedder.h" 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 focused_ = focused; 380 focused_ = focused;
381 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost(); 381 RenderViewHost* render_view_host = web_contents()->GetRenderViewHost();
382 render_view_host->Send( 382 render_view_host->Send(
383 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused)); 383 new ViewMsg_SetFocus(render_view_host->GetRoutingID(), focused));
384 } 384 }
385 385
386 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host, 386 void BrowserPluginGuest::ShowWidget(RenderViewHost* render_view_host,
387 int route_id, 387 int route_id,
388 const gfx::Rect& initial_pos) { 388 const gfx::Rect& initial_pos) {
389 gfx::Rect screen_pos(initial_pos); 389 gfx::Rect screen_pos(initial_pos);
390 screen_pos.Offset(guest_rect_.origin()); 390 screen_pos.Offset(guest_rect_.OffsetFromOrigin());
391 static_cast<WebContentsImpl*>(web_contents())->ShowCreatedWidget(route_id, 391 static_cast<WebContentsImpl*>(web_contents())->ShowCreatedWidget(route_id,
392 screen_pos); 392 screen_pos);
393 } 393 }
394 394
395 void BrowserPluginGuest::SetCursor(const WebCursor& cursor) { 395 void BrowserPluginGuest::SetCursor(const WebCursor& cursor) {
396 cursor_ = cursor; 396 cursor_ = cursor;
397 } 397 }
398 398
399 void BrowserPluginGuest::DidStartProvisionalLoadForFrame( 399 void BrowserPluginGuest::DidStartProvisionalLoadForFrame(
400 int64 frame_id, 400 int64 frame_id,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 default: 503 default:
504 break; 504 break;
505 } 505 }
506 } 506 }
507 507
508 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { 508 void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) {
509 embedder_web_contents_->GetRenderProcessHost()->Send(msg); 509 embedder_web_contents_->GetRenderProcessHost()->Send(msg);
510 } 510 }
511 511
512 } // namespace content 512 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698