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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 // to initialize the browser-side state now so that the RenderFrameHostManager | 540 // to initialize the browser-side state now so that the RenderFrameHostManager |
541 // does not create a new RenderView on navigation. | 541 // does not create a new RenderView on navigation. |
542 if (has_render_view_) { | 542 if (has_render_view_) { |
543 // This will trigger a callback to RenderViewReady after a round-trip IPC. | 543 // This will trigger a callback to RenderViewReady after a round-trip IPC. |
544 static_cast<RenderViewHostImpl*>( | 544 static_cast<RenderViewHostImpl*>( |
545 GetWebContents()->GetRenderViewHost())->Init(); | 545 GetWebContents()->GetRenderViewHost())->Init(); |
546 WebContentsViewGuest* web_contents_view = | 546 WebContentsViewGuest* web_contents_view = |
547 static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); | 547 static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); |
548 if (!web_contents()->GetRenderViewHost()->GetView()) { | 548 if (!web_contents()->GetRenderViewHost()->GetView()) { |
549 web_contents_view->CreateViewForWidget( | 549 web_contents_view->CreateViewForWidget( |
550 web_contents()->GetRenderViewHost()); | 550 web_contents()->GetRenderViewHost(), true); |
551 } | 551 } |
552 } | 552 } |
553 | 553 |
554 Initialize(browser_plugin_instance_id, params, embedder_web_contents); | 554 Initialize(browser_plugin_instance_id, params, embedder_web_contents); |
555 | 555 |
556 SendQueuedMessages(); | 556 SendQueuedMessages(); |
557 | 557 |
558 // Create a swapped out RenderView for the guest in the embedder render | 558 // Create a swapped out RenderView for the guest in the embedder render |
559 // process, so that the embedder can access the guest's window object. | 559 // process, so that the embedder can access the guest's window object. |
560 // On reattachment, we can reuse the same swapped out RenderView because | 560 // On reattachment, we can reuse the same swapped out RenderView because |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 822 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
823 const gfx::Range& range, | 823 const gfx::Range& range, |
824 const std::vector<gfx::Rect>& character_bounds) { | 824 const std::vector<gfx::Rect>& character_bounds) { |
825 static_cast<RenderWidgetHostViewBase*>( | 825 static_cast<RenderWidgetHostViewBase*>( |
826 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 826 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
827 range, character_bounds); | 827 range, character_bounds); |
828 } | 828 } |
829 #endif | 829 #endif |
830 | 830 |
831 } // namespace content | 831 } // namespace content |
OLD | NEW |