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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 // to initialize the browser-side state now so that the RenderFrameHostManager | 531 // to initialize the browser-side state now so that the RenderFrameHostManager |
532 // does not create a new RenderView on navigation. | 532 // does not create a new RenderView on navigation. |
533 if (has_render_view_) { | 533 if (has_render_view_) { |
534 // This will trigger a callback to RenderViewReady after a round-trip IPC. | 534 // This will trigger a callback to RenderViewReady after a round-trip IPC. |
535 static_cast<RenderViewHostImpl*>( | 535 static_cast<RenderViewHostImpl*>( |
536 GetWebContents()->GetRenderViewHost())->Init(); | 536 GetWebContents()->GetRenderViewHost())->Init(); |
537 WebContentsViewGuest* web_contents_view = | 537 WebContentsViewGuest* web_contents_view = |
538 static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); | 538 static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); |
539 if (!web_contents()->GetRenderViewHost()->GetView()) { | 539 if (!web_contents()->GetRenderViewHost()->GetView()) { |
540 web_contents_view->CreateViewForWidget( | 540 web_contents_view->CreateViewForWidget( |
541 web_contents()->GetRenderViewHost()); | 541 web_contents()->GetRenderViewHost(), true); |
542 } | 542 } |
543 } | 543 } |
544 | 544 |
545 Initialize(browser_plugin_instance_id, params, embedder_web_contents); | 545 Initialize(browser_plugin_instance_id, params, embedder_web_contents); |
546 | 546 |
547 SendQueuedMessages(); | 547 SendQueuedMessages(); |
548 | 548 |
549 // Create a swapped out RenderView for the guest in the embedder render | 549 // Create a swapped out RenderView for the guest in the embedder render |
550 // process, so that the embedder can access the guest's window object. | 550 // process, so that the embedder can access the guest's window object. |
551 // On reattachment, we can reuse the same swapped out RenderView because | 551 // On reattachment, we can reuse the same swapped out RenderView because |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 813 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
814 const gfx::Range& range, | 814 const gfx::Range& range, |
815 const std::vector<gfx::Rect>& character_bounds) { | 815 const std::vector<gfx::Rect>& character_bounds) { |
816 static_cast<RenderWidgetHostViewBase*>( | 816 static_cast<RenderWidgetHostViewBase*>( |
817 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 817 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
818 range, character_bounds); | 818 range, character_bounds); |
819 } | 819 } |
820 #endif | 820 #endif |
821 | 821 |
822 } // namespace content | 822 } // namespace content |
OLD | NEW |