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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 313 } |
314 | 314 |
315 BrowserPluginGuest::~BrowserPluginGuest() { | 315 BrowserPluginGuest::~BrowserPluginGuest() { |
316 } | 316 } |
317 | 317 |
318 // static | 318 // static |
319 BrowserPluginGuest* BrowserPluginGuest::Create( | 319 BrowserPluginGuest* BrowserPluginGuest::Create( |
320 WebContentsImpl* web_contents, | 320 WebContentsImpl* web_contents, |
321 BrowserPluginGuestDelegate* delegate) { | 321 BrowserPluginGuestDelegate* delegate) { |
322 return new BrowserPluginGuest( | 322 return new BrowserPluginGuest( |
323 web_contents->opener() != nullptr, web_contents, delegate); | 323 web_contents->HasOpener(), web_contents, delegate); |
324 } | 324 } |
325 | 325 |
326 // static | 326 // static |
327 bool BrowserPluginGuest::IsGuest(WebContentsImpl* web_contents) { | 327 bool BrowserPluginGuest::IsGuest(WebContentsImpl* web_contents) { |
328 return web_contents && web_contents->GetBrowserPluginGuest(); | 328 return web_contents && web_contents->GetBrowserPluginGuest(); |
329 } | 329 } |
330 | 330 |
331 // static | 331 // static |
332 bool BrowserPluginGuest::IsGuest(RenderViewHostImpl* render_view_host) { | 332 bool BrowserPluginGuest::IsGuest(RenderViewHostImpl* render_view_host) { |
333 return render_view_host && IsGuest( | 333 return render_view_host && IsGuest( |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 925 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
926 const gfx::Range& range, | 926 const gfx::Range& range, |
927 const std::vector<gfx::Rect>& character_bounds) { | 927 const std::vector<gfx::Rect>& character_bounds) { |
928 static_cast<RenderWidgetHostViewBase*>( | 928 static_cast<RenderWidgetHostViewBase*>( |
929 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 929 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
930 range, character_bounds); | 930 range, character_bounds); |
931 } | 931 } |
932 #endif | 932 #endif |
933 | 933 |
934 } // namespace content | 934 } // namespace content |
OLD | NEW |