| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_PLUGIN_LOADER_POSIX_H_ | 5 #ifndef CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_ |
| 6 #define CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_ | 6 #define CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void OnPluginLoaded(const webkit::WebPluginInfo& plugin); | 80 void OnPluginLoaded(const webkit::WebPluginInfo& plugin); |
| 81 void OnPluginLoadFailed(const FilePath& plugin_path); | 81 void OnPluginLoadFailed(const FilePath& plugin_path); |
| 82 | 82 |
| 83 // Checks if the plugin path is an internal plugin, and, if it is, adds it to | 83 // Checks if the plugin path is an internal plugin, and, if it is, adds it to |
| 84 // |loaded_plugins_|. | 84 // |loaded_plugins_|. |
| 85 bool MaybeAddInternalPlugin(const FilePath& plugin_path); | 85 bool MaybeAddInternalPlugin(const FilePath& plugin_path); |
| 86 | 86 |
| 87 // Runs all the registered callbacks on each's target loop if the condition | 87 // Runs all the registered callbacks on each's target loop if the condition |
| 88 // for ending the load process is done (i.e. the |next_load_index_| is outside | 88 // for ending the load process is done (i.e. the |next_load_index_| is outside |
| 89 // the ranage of the |canonical_list_|). | 89 // the ranage of the |canonical_list_|). |
| 90 bool MaybeRunPendingCallbacks(); | 90 void RunPendingCallbacks(); |
| 91 | 91 |
| 92 // The process host for which this is a client. | 92 // The process host for which this is a client. |
| 93 UtilityProcessHost* process_host_; | 93 UtilityProcessHost* process_host_; |
| 94 | 94 |
| 95 // A list of paths to plugins which will be loaded by the utility process, in | 95 // A list of paths to plugins which will be loaded by the utility process, in |
| 96 // the order specified by this vector. | 96 // the order specified by this vector. |
| 97 std::vector<FilePath> canonical_list_; | 97 std::vector<FilePath> canonical_list_; |
| 98 | 98 |
| 99 // The index in |canonical_list_| of the plugin that the child process will | 99 // The index in |canonical_list_| of the plugin that the child process will |
| 100 // attempt to load next. | 100 // attempt to load next. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 111 std::vector<PendingCallback> callbacks_; | 111 std::vector<PendingCallback> callbacks_; |
| 112 | 112 |
| 113 // The time at which plugin loading started. | 113 // The time at which plugin loading started. |
| 114 base::TimeTicks load_start_time_; | 114 base::TimeTicks load_start_time_; |
| 115 | 115 |
| 116 friend class MockPluginLoaderPosix; | 116 friend class MockPluginLoaderPosix; |
| 117 DISALLOW_COPY_AND_ASSIGN(PluginLoaderPosix); | 117 DISALLOW_COPY_AND_ASSIGN(PluginLoaderPosix); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 #endif // CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_ | 120 #endif // CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_ |
| OLD | NEW |