| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 namespace content { | 44 namespace content { |
| 45 | 45 |
| 46 class BrowserPluginGuest::EmbedderWebContentsObserver | 46 class BrowserPluginGuest::EmbedderWebContentsObserver |
| 47 : public WebContentsObserver { | 47 : public WebContentsObserver { |
| 48 public: | 48 public: |
| 49 explicit EmbedderWebContentsObserver(BrowserPluginGuest* guest) | 49 explicit EmbedderWebContentsObserver(BrowserPluginGuest* guest) |
| 50 : WebContentsObserver(guest->embedder_web_contents()), | 50 : WebContentsObserver(guest->embedder_web_contents()), |
| 51 browser_plugin_guest_(guest) { | 51 browser_plugin_guest_(guest) { |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual ~EmbedderWebContentsObserver() { | 54 ~EmbedderWebContentsObserver() override {} |
| 55 } | |
| 56 | 55 |
| 57 // WebContentsObserver implementation. | 56 // WebContentsObserver implementation. |
| 58 virtual void WasShown() override { | 57 void WasShown() override { |
| 59 browser_plugin_guest_->EmbedderVisibilityChanged(true); | 58 browser_plugin_guest_->EmbedderVisibilityChanged(true); |
| 60 } | 59 } |
| 61 | 60 |
| 62 virtual void WasHidden() override { | 61 void WasHidden() override { |
| 63 browser_plugin_guest_->EmbedderVisibilityChanged(false); | 62 browser_plugin_guest_->EmbedderVisibilityChanged(false); |
| 64 } | 63 } |
| 65 | 64 |
| 66 private: | 65 private: |
| 67 BrowserPluginGuest* browser_plugin_guest_; | 66 BrowserPluginGuest* browser_plugin_guest_; |
| 68 | 67 |
| 69 DISALLOW_COPY_AND_ASSIGN(EmbedderWebContentsObserver); | 68 DISALLOW_COPY_AND_ASSIGN(EmbedderWebContentsObserver); |
| 70 }; | 69 }; |
| 71 | 70 |
| 72 BrowserPluginGuest::BrowserPluginGuest(bool has_render_view, | 71 BrowserPluginGuest::BrowserPluginGuest(bool has_render_view, |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 820 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
| 822 const gfx::Range& range, | 821 const gfx::Range& range, |
| 823 const std::vector<gfx::Rect>& character_bounds) { | 822 const std::vector<gfx::Rect>& character_bounds) { |
| 824 static_cast<RenderWidgetHostViewBase*>( | 823 static_cast<RenderWidgetHostViewBase*>( |
| 825 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 824 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
| 826 range, character_bounds); | 825 range, character_bounds); |
| 827 } | 826 } |
| 828 #endif | 827 #endif |
| 829 | 828 |
| 830 } // namespace content | 829 } // namespace content |
| OLD | NEW |