| 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/pickle.h" | 10 #include "base/pickle.h" |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 while (!pending_messages_.empty()) { | 423 while (!pending_messages_.empty()) { |
| 424 linked_ptr<IPC::Message> message_ptr = pending_messages_.front(); | 424 linked_ptr<IPC::Message> message_ptr = pending_messages_.front(); |
| 425 pending_messages_.pop_front(); | 425 pending_messages_.pop_front(); |
| 426 SendMessageToEmbedder(message_ptr.release()); | 426 SendMessageToEmbedder(message_ptr.release()); |
| 427 } | 427 } |
| 428 } | 428 } |
| 429 | 429 |
| 430 void BrowserPluginGuest::DidCommitProvisionalLoadForFrame( | 430 void BrowserPluginGuest::DidCommitProvisionalLoadForFrame( |
| 431 RenderFrameHost* render_frame_host, | 431 RenderFrameHost* render_frame_host, |
| 432 const GURL& url, | 432 const GURL& url, |
| 433 PageTransition transition_type) { | 433 ui::PageTransition transition_type) { |
| 434 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); | 434 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); |
| 435 } | 435 } |
| 436 | 436 |
| 437 void BrowserPluginGuest::RenderViewReady() { | 437 void BrowserPluginGuest::RenderViewReady() { |
| 438 RenderViewHost* rvh = GetWebContents()->GetRenderViewHost(); | 438 RenderViewHost* rvh = GetWebContents()->GetRenderViewHost(); |
| 439 // TODO(fsamuel): Investigate whether it's possible to update state earlier | 439 // TODO(fsamuel): Investigate whether it's possible to update state earlier |
| 440 // here (see http://crbug.com/158151). | 440 // here (see http://crbug.com/158151). |
| 441 Send(new InputMsg_SetFocus(routing_id(), focused_)); | 441 Send(new InputMsg_SetFocus(routing_id(), focused_)); |
| 442 UpdateVisibility(); | 442 UpdateVisibility(); |
| 443 | 443 |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 836 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
| 837 const gfx::Range& range, | 837 const gfx::Range& range, |
| 838 const std::vector<gfx::Rect>& character_bounds) { | 838 const std::vector<gfx::Rect>& character_bounds) { |
| 839 static_cast<RenderWidgetHostViewBase*>( | 839 static_cast<RenderWidgetHostViewBase*>( |
| 840 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 840 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
| 841 range, character_bounds); | 841 range, character_bounds); |
| 842 } | 842 } |
| 843 #endif | 843 #endif |
| 844 | 844 |
| 845 } // namespace content | 845 } // namespace content |
| OLD | NEW |