| 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 CONTENT_PUBLIC_PLUGIN_CONTENT_PLUGIN_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_PLUGIN_CONTENT_PLUGIN_CLIENT_H_ |
| 6 #define CONTENT_PUBLIC_PLUGIN_CONTENT_PLUGIN_CLIENT_H_ | 6 #define CONTENT_PUBLIC_PLUGIN_CONTENT_PLUGIN_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" |
| 8 #include "base/string16.h" | 9 #include "base/string16.h" |
| 9 #include "content/public/common/content_client.h" | 10 #include "content/public/common/content_client.h" |
| 10 | 11 |
| 11 namespace content { | 12 namespace content { |
| 12 | 13 |
| 13 // Embedder API for participating in plugin logic. | 14 // Embedder API for participating in plugin logic. |
| 14 class CONTENT_EXPORT ContentPluginClient { | 15 class CONTENT_EXPORT ContentPluginClient { |
| 15 public: | 16 public: |
| 17 // Make sure the enum list in tools/histogram/histograms.xml is updated with |
| 18 // any change in this list. |
| 19 enum PluginLoadResult { |
| 20 LOAD_SUCCESS, |
| 21 LOAD_FAILED, |
| 22 ENTRY_POINT_MISSING, |
| 23 INIT_FAILED, |
| 24 // NOTE: Add new values only immediately above this line. |
| 25 LOAD_STATUS_MAX // Boundary value for UMA_HISTOGRAM_ENUMERATION. |
| 26 }; |
| 27 |
| 16 virtual ~ContentPluginClient() {} | 28 virtual ~ContentPluginClient() {} |
| 17 | 29 |
| 18 // Called to perform any per-process initialization necessary before | 30 // Called to perform any per-process initialization necessary before |
| 19 // the sandbox is initialized for the plugin process. | 31 // the sandbox is initialized for the plugin process. |
| 20 virtual void PreSandboxInitialization() {} | 32 virtual void PreSandboxInitialization() {} |
| 21 | 33 |
| 22 // Notifies that a plugin process has started. | 34 // Notifies that a plugin process has started. |
| 23 virtual void PluginProcessStarted(const string16& plugin_name) {} | 35 virtual void PluginProcessStarted(const string16& plugin_name) {} |
| 36 |
| 37 // Notifies the plugin loading result. |
| 38 virtual void PluginLoaded(const base::FilePath& plugin_path, |
| 39 bool is_broker, |
| 40 PluginLoadResult result) {} |
| 24 }; | 41 }; |
| 25 | 42 |
| 26 } // namespace content | 43 } // namespace content |
| 27 | 44 |
| 28 #endif // CONTENT_PUBLIC_PLUGIN_CONTENT_PLUGIN_CLIENT_H_ | 45 #endif // CONTENT_PUBLIC_PLUGIN_CONTENT_PLUGIN_CLIENT_H_ |
| OLD | NEW |