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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 embedder_web_contents_->GetRenderViewHost())->input_method_active()) { | 219 embedder_web_contents_->GetRenderViewHost())->input_method_active()) { |
220 RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>( | 220 RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>( |
221 GetWebContents()->GetRenderViewHost()); | 221 GetWebContents()->GetRenderViewHost()); |
222 guest_rvh->SetInputMethodActive(true); | 222 guest_rvh->SetInputMethodActive(true); |
223 } | 223 } |
224 | 224 |
225 // Inform the embedder of the guest's attachment. | 225 // Inform the embedder of the guest's attachment. |
226 SendMessageToEmbedder(new BrowserPluginMsg_Attach_ACK(instance_id_)); | 226 SendMessageToEmbedder(new BrowserPluginMsg_Attach_ACK(instance_id_)); |
227 | 227 |
228 if (delegate_) { | 228 if (delegate_) { |
229 delegate_->DidAttach(extra_params); | 229 delegate_->DidAttach(embedder_web_contents, extra_params); |
230 has_render_view_ = true; | 230 has_render_view_ = true; |
231 } | 231 } |
232 } | 232 } |
233 | 233 |
234 BrowserPluginGuest::~BrowserPluginGuest() { | 234 BrowserPluginGuest::~BrowserPluginGuest() { |
235 } | 235 } |
236 | 236 |
237 // static | 237 // static |
238 BrowserPluginGuest* BrowserPluginGuest::Create( | 238 BrowserPluginGuest* BrowserPluginGuest::Create( |
239 int instance_id, | 239 int instance_id, |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 892 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
893 const gfx::Range& range, | 893 const gfx::Range& range, |
894 const std::vector<gfx::Rect>& character_bounds) { | 894 const std::vector<gfx::Rect>& character_bounds) { |
895 static_cast<RenderWidgetHostViewBase*>( | 895 static_cast<RenderWidgetHostViewBase*>( |
896 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 896 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
897 range, character_bounds); | 897 range, character_bounds); |
898 } | 898 } |
899 #endif | 899 #endif |
900 | 900 |
901 } // namespace content | 901 } // namespace content |
OLD | NEW |