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_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 <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <vector> | 11 #include <vector> |
9 | 12 |
10 #include "base/basictypes.h" | |
11 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
13 #include "base/time/time.h" | 16 #include "base/time/time.h" |
14 #include "content/browser/plugin_service_impl.h" | 17 #include "content/browser/plugin_service_impl.h" |
15 #include "content/public/browser/utility_process_host_client.h" | 18 #include "content/public/browser/utility_process_host_client.h" |
16 #include "content/public/common/webplugininfo.h" | 19 #include "content/public/common/webplugininfo.h" |
17 #include "ipc/ipc_sender.h" | 20 #include "ipc/ipc_sender.h" |
18 | 21 |
19 namespace content { | 22 namespace content { |
20 class UtilityProcessHost; | 23 class UtilityProcessHost; |
21 | 24 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Must be called on the IO thread. | 70 // Must be called on the IO thread. |
68 virtual void LoadPluginsInternal(); | 71 virtual void LoadPluginsInternal(); |
69 | 72 |
70 // Called after plugin loading has finished, if we don't know whether the | 73 // Called after plugin loading has finished, if we don't know whether the |
71 // plugin list has been invalidated in the mean time. | 74 // plugin list has been invalidated in the mean time. |
72 void GetPluginsWrapper( | 75 void GetPluginsWrapper( |
73 const PluginService::GetPluginsCallback& callback, | 76 const PluginService::GetPluginsCallback& callback, |
74 const std::vector<WebPluginInfo>& plugins_unused); | 77 const std::vector<WebPluginInfo>& plugins_unused); |
75 | 78 |
76 // Message handlers. | 79 // Message handlers. |
77 void OnPluginLoaded(uint32 index, const WebPluginInfo& plugin); | 80 void OnPluginLoaded(uint32_t index, const WebPluginInfo& plugin); |
78 void OnPluginLoadFailed(uint32 index, const base::FilePath& plugin_path); | 81 void OnPluginLoadFailed(uint32_t index, const base::FilePath& plugin_path); |
79 | 82 |
80 // Returns an iterator to the plugin in |internal_plugins_| whose path | 83 // Returns an iterator to the plugin in |internal_plugins_| whose path |
81 // matches |plugin_path|. | 84 // matches |plugin_path|. |
82 std::vector<WebPluginInfo>::iterator FindInternalPlugin( | 85 std::vector<WebPluginInfo>::iterator FindInternalPlugin( |
83 const base::FilePath& plugin_path); | 86 const base::FilePath& plugin_path); |
84 | 87 |
85 // Runs all the registered callbacks on each's target loop if the condition | 88 // Runs all the registered callbacks on each's target loop if the condition |
86 // for ending the load process is done (i.e. the |next_load_index_| is outside | 89 // for ending the load process is done (i.e. the |next_load_index_| is outside |
87 // the range of the |canonical_list_|). | 90 // the range of the |canonical_list_|). |
88 bool MaybeRunPendingCallbacks(); | 91 bool MaybeRunPendingCallbacks(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // True if there is (or is about to be) a utility process that loads plugins. | 125 // True if there is (or is about to be) a utility process that loads plugins. |
123 bool loading_plugins_; | 126 bool loading_plugins_; |
124 | 127 |
125 friend class MockPluginLoaderPosix; | 128 friend class MockPluginLoaderPosix; |
126 DISALLOW_COPY_AND_ASSIGN(PluginLoaderPosix); | 129 DISALLOW_COPY_AND_ASSIGN(PluginLoaderPosix); |
127 }; | 130 }; |
128 | 131 |
129 } // namespace content | 132 } // namespace content |
130 | 133 |
131 #endif // CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_ | 134 #endif // CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_ |
OLD | NEW |