| 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 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_ | 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 namespace content { | 27 namespace content { |
| 28 class WebContents; | 28 class WebContents; |
| 29 } | 29 } |
| 30 | 30 |
| 31 class PluginObserver : public content::WebContentsObserver, | 31 class PluginObserver : public content::WebContentsObserver, |
| 32 public content::WebContentsUserData<PluginObserver> { | 32 public content::WebContentsUserData<PluginObserver> { |
| 33 public: | 33 public: |
| 34 virtual ~PluginObserver(); | 34 virtual ~PluginObserver(); |
| 35 | 35 |
| 36 // content::WebContentsObserver implementation. | 36 // content::WebContentsObserver implementation. |
| 37 virtual void RenderViewCreated( |
| 38 content::RenderViewHost* render_view_host) OVERRIDE; |
| 37 virtual void PluginCrashed(const base::FilePath& plugin_path, | 39 virtual void PluginCrashed(const base::FilePath& plugin_path, |
| 38 base::ProcessId plugin_pid) OVERRIDE; | 40 base::ProcessId plugin_pid) OVERRIDE; |
| 39 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 40 virtual void AboutToNavigateRenderView( | |
| 41 content::RenderViewHost* render_view_host) OVERRIDE; | |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 explicit PluginObserver(content::WebContents* web_contents); | 44 explicit PluginObserver(content::WebContents* web_contents); |
| 45 friend class content::WebContentsUserData<PluginObserver>; | 45 friend class content::WebContentsUserData<PluginObserver>; |
| 46 | 46 |
| 47 class PluginPlaceholderHost; | 47 class PluginPlaceholderHost; |
| 48 | 48 |
| 49 #if defined(ENABLE_PLUGIN_INSTALLATION) | 49 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 50 void InstallMissingPlugin(PluginInstaller* installer, | 50 void InstallMissingPlugin(PluginInstaller* installer, |
| 51 const PluginMetadata* plugin_metadata); | 51 const PluginMetadata* plugin_metadata); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 69 | 69 |
| 70 #if defined(ENABLE_PLUGIN_INSTALLATION) | 70 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 71 // Stores all PluginPlaceholderHosts, keyed by their routing ID. | 71 // Stores all PluginPlaceholderHosts, keyed by their routing ID. |
| 72 std::map<int, PluginPlaceholderHost*> plugin_placeholders_; | 72 std::map<int, PluginPlaceholderHost*> plugin_placeholders_; |
| 73 #endif | 73 #endif |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(PluginObserver); | 75 DISALLOW_COPY_AND_ASSIGN(PluginObserver); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_ | 78 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_ |
| OLD | NEW |