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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
643 // embedder shutdown or when the embedder navigates to a different page. | 643 // embedder shutdown or when the embedder navigates to a different page. |
644 // The call stack is roughly: | 644 // The call stack is roughly: |
645 // BrowserPluginGuest::SetFocus() | 645 // BrowserPluginGuest::SetFocus() |
646 // content::InterstitialPageImpl::Hide() | 646 // content::InterstitialPageImpl::Hide() |
647 // content::InterstitialPageImpl::DontProceed(). | 647 // content::InterstitialPageImpl::DontProceed(). |
648 // | 648 // |
649 // TODO(lazyboy): Write a WebUI test once http://crbug.com/463674 is fixed. | 649 // TODO(lazyboy): Write a WebUI test once http://crbug.com/463674 is fixed. |
650 return; | 650 return; |
651 } | 651 } |
652 | 652 |
653 if (last_text_input_state_.get()) | 653 if (last_text_input_state_.get()) { |
654 guest_rwhv->TextInputStateChanged(*last_text_input_state_); | 654 guest_rwhv->TextInputStateChanged(*last_text_input_state_); |
655 if (auto* rwh = | |
656 RenderWidgetHostImpl::From(guest_rwhv->GetRenderWidgetHost())) { | |
657 rwh->RequestCompositionUpdates( | |
Charlie Reis
2017/06/06 22:52:13
Can you add a comment for why this is needed? I d
EhsanK
2017/06/09 19:09:10
Yes I should have put a comment here. Done!
| |
658 false, last_text_input_state_->type != ui::TEXT_INPUT_TYPE_NONE); | |
659 } | |
660 } | |
655 } | 661 } |
656 | 662 |
657 void BrowserPluginGuest::DidFinishNavigation( | 663 void BrowserPluginGuest::DidFinishNavigation( |
658 NavigationHandle* navigation_handle) { | 664 NavigationHandle* navigation_handle) { |
659 if (navigation_handle->HasCommitted()) | 665 if (navigation_handle->HasCommitted()) |
660 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); | 666 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); |
661 } | 667 } |
662 | 668 |
663 void BrowserPluginGuest::RenderViewReady() { | 669 void BrowserPluginGuest::RenderViewReady() { |
664 if (GuestMode::IsCrossProcessFrameGuest(GetWebContents())) | 670 if (GuestMode::IsCrossProcessFrameGuest(GetWebContents())) |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1072 range, character_bounds); | 1078 range, character_bounds); |
1073 } | 1079 } |
1074 #endif | 1080 #endif |
1075 | 1081 |
1076 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1082 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
1077 if (delegate_) | 1083 if (delegate_) |
1078 delegate_->SetContextMenuPosition(position); | 1084 delegate_->SetContextMenuPosition(position); |
1079 } | 1085 } |
1080 | 1086 |
1081 } // namespace content | 1087 } // namespace content |
OLD | NEW |