| 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/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "chrome/browser/common/web_contents_user_data.h" | 9 #include "chrome/browser/common/web_contents_user_data.h" |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 public WebContentsUserData<PluginObserver> { | 32 public 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 PluginCrashed(const FilePath& plugin_path) OVERRIDE; | 37 virtual void PluginCrashed(const FilePath& plugin_path) OVERRIDE; |
| 38 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 38 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 explicit PluginObserver(content::WebContents* web_contents); | 41 explicit PluginObserver(content::WebContents* web_contents); |
| 42 static int kUserDataKey; | |
| 43 friend class WebContentsUserData<PluginObserver>; | 42 friend class WebContentsUserData<PluginObserver>; |
| 44 | 43 |
| 45 class PluginPlaceholderHost; | 44 class PluginPlaceholderHost; |
| 46 | 45 |
| 47 #if defined(ENABLE_PLUGIN_INSTALLATION) | 46 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 48 void InstallMissingPlugin(PluginInstaller* installer, | 47 void InstallMissingPlugin(PluginInstaller* installer, |
| 49 PluginMetadata* plugin_metadata); | 48 PluginMetadata* plugin_metadata); |
| 50 #endif | 49 #endif |
| 51 | 50 |
| 52 // Message handlers: | 51 // Message handlers: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 66 | 65 |
| 67 #if defined(ENABLE_PLUGIN_INSTALLATION) | 66 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 68 // Stores all PluginPlaceholderHosts, keyed by their routing ID. | 67 // Stores all PluginPlaceholderHosts, keyed by their routing ID. |
| 69 std::map<int, PluginPlaceholderHost*> plugin_placeholders_; | 68 std::map<int, PluginPlaceholderHost*> plugin_placeholders_; |
| 70 #endif | 69 #endif |
| 71 | 70 |
| 72 DISALLOW_COPY_AND_ASSIGN(PluginObserver); | 71 DISALLOW_COPY_AND_ASSIGN(PluginObserver); |
| 73 }; | 72 }; |
| 74 | 73 |
| 75 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_ | 74 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_ |
| OLD | NEW |