OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 guest_rwhv->TextInputStateChanged(*last_text_input_state_); | 651 guest_rwhv->TextInputStateChanged(*last_text_input_state_); |
652 } | 652 } |
653 | 653 |
654 void BrowserPluginGuest::DidFinishNavigation( | 654 void BrowserPluginGuest::DidFinishNavigation( |
655 NavigationHandle* navigation_handle) { | 655 NavigationHandle* navigation_handle) { |
656 if (navigation_handle->HasCommitted()) | 656 if (navigation_handle->HasCommitted()) |
657 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); | 657 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); |
658 } | 658 } |
659 | 659 |
660 void BrowserPluginGuest::RenderViewReady() { | 660 void BrowserPluginGuest::RenderViewReady() { |
| 661 if (GuestMode::IsCrossProcessFrameGuest(GetWebContents())) |
| 662 return; |
| 663 |
661 RenderViewHost* rvh = GetWebContents()->GetRenderViewHost(); | 664 RenderViewHost* rvh = GetWebContents()->GetRenderViewHost(); |
662 // TODO(fsamuel): Investigate whether it's possible to update state earlier | 665 // TODO(fsamuel): Investigate whether it's possible to update state earlier |
663 // here (see http://crbug.com/158151). | 666 // here (see http://crbug.com/158151). |
664 Send(new InputMsg_SetFocus(routing_id(), focused_)); | 667 Send(new InputMsg_SetFocus(routing_id(), focused_)); |
665 UpdateVisibility(); | 668 UpdateVisibility(); |
666 | 669 |
667 // In case we've created a new guest render process after a crash, let the | 670 // In case we've created a new guest render process after a crash, let the |
668 // associated BrowserPlugin know. We only need to send this if we're attached, | 671 // associated BrowserPlugin know. We only need to send this if we're attached, |
669 // as guest_crashed_ is cleared automatically on attach anyways. | 672 // as guest_crashed_ is cleared automatically on attach anyways. |
670 if (attached()) { | 673 if (attached()) { |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 range, character_bounds); | 1063 range, character_bounds); |
1061 } | 1064 } |
1062 #endif | 1065 #endif |
1063 | 1066 |
1064 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1067 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
1065 if (delegate_) | 1068 if (delegate_) |
1066 delegate_->SetContextMenuPosition(position); | 1069 delegate_->SetContextMenuPosition(position); |
1067 } | 1070 } |
1068 | 1071 |
1069 } // namespace content | 1072 } // namespace content |
OLD | NEW |