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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); | 475 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.DidNavigate")); |
476 } | 476 } |
477 | 477 |
478 void BrowserPluginGuest::RenderViewReady() { | 478 void BrowserPluginGuest::RenderViewReady() { |
479 RenderViewHost* rvh = GetWebContents()->GetRenderViewHost(); | 479 RenderViewHost* rvh = GetWebContents()->GetRenderViewHost(); |
480 // TODO(fsamuel): Investigate whether it's possible to update state earlier | 480 // TODO(fsamuel): Investigate whether it's possible to update state earlier |
481 // here (see http://crbug.com/158151). | 481 // here (see http://crbug.com/158151). |
482 Send(new InputMsg_SetFocus(routing_id(), focused_)); | 482 Send(new InputMsg_SetFocus(routing_id(), focused_)); |
483 UpdateVisibility(); | 483 UpdateVisibility(); |
484 | 484 |
485 RenderWidgetHostImpl::From(rvh)->set_hung_renderer_delay_ms( | 485 RenderWidgetHostImpl::From(rvh)->set_hung_renderer_delay( |
486 base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)); | 486 base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)); |
487 } | 487 } |
488 | 488 |
489 void BrowserPluginGuest::RenderProcessGone(base::TerminationStatus status) { | 489 void BrowserPluginGuest::RenderProcessGone(base::TerminationStatus status) { |
490 SendMessageToEmbedder( | 490 SendMessageToEmbedder( |
491 new BrowserPluginMsg_GuestGone(browser_plugin_instance_id())); | 491 new BrowserPluginMsg_GuestGone(browser_plugin_instance_id())); |
492 switch (status) { | 492 switch (status) { |
493 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: | 493 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: |
494 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.Killed")); | 494 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.Killed")); |
495 break; | 495 break; |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 887 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
888 const gfx::Range& range, | 888 const gfx::Range& range, |
889 const std::vector<gfx::Rect>& character_bounds) { | 889 const std::vector<gfx::Rect>& character_bounds) { |
890 static_cast<RenderWidgetHostViewBase*>( | 890 static_cast<RenderWidgetHostViewBase*>( |
891 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 891 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
892 range, character_bounds); | 892 range, character_bounds); |
893 } | 893 } |
894 #endif | 894 #endif |
895 | 895 |
896 } // namespace content | 896 } // namespace content |
OLD | NEW |