| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_COMMON_CHROME_PLUGIN_UTIL_H__ | 5 #ifndef CHROME_COMMON_CHROME_PLUGIN_UTIL_H__ |
| 6 #define CHROME_COMMON_CHROME_PLUGIN_UTIL_H__ | 6 #define CHROME_COMMON_CHROME_PLUGIN_UTIL_H__ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/non_thread_safe.h" | 9 #include "base/non_thread_safe.h" |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| 11 #include "chrome/common/chrome_plugin_api.h" | 11 #include "chrome/common/chrome_plugin_api.h" |
| 12 #include "chrome/common/notification_observer.h" | 12 #include "chrome/common/notification_observer.h" |
| 13 | 13 |
| 14 class ChromePluginLib; | 14 class ChromePluginLib; |
| 15 class MessageLoop; | 15 class MessageLoop; |
| 16 namespace net{ | 16 namespace net { |
| 17 class HttpResponseHeaders; | 17 class HttpResponseHeaders; |
| 18 } | 18 } |
| 19 | 19 |
| 20 // A helper struct to ensure the CPRequest data is cleaned up when done. | 20 // A helper struct to ensure the CPRequest data is cleaned up when done. |
| 21 // This class is reused for requests made by the browser (and intercepted by the | 21 // This class is reused for requests made by the browser (and intercepted by the |
| 22 // plugin) as well as those made by the plugin. | 22 // plugin) as well as those made by the plugin. |
| 23 struct ScopableCPRequest : public CPRequest { | 23 struct ScopableCPRequest : public CPRequest { |
| 24 template<class T> | 24 template<class T> |
| 25 static T GetData(CPRequest* request) { | 25 static T GetData(CPRequest* request) { |
| 26 return static_cast<T>(static_cast<ScopableCPRequest*>(request)->data); | 26 return static_cast<T>(static_cast<ScopableCPRequest*>(request)->data); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 | 76 |
| 77 CPError CPB_GetCommandLineArgumentsCommon(const char* url, | 77 CPError CPB_GetCommandLineArgumentsCommon(const char* url, |
| 78 std::string* arguments); | 78 std::string* arguments); |
| 79 | 79 |
| 80 void* STDCALL CPB_Alloc(uint32 size); | 80 void* STDCALL CPB_Alloc(uint32 size); |
| 81 void STDCALL CPB_Free(void* memory); | 81 void STDCALL CPB_Free(void* memory); |
| 82 | 82 |
| 83 #endif // CHROME_COMMON_CHROME_PLUGIN_UTIL_H__ | 83 #endif // CHROME_COMMON_CHROME_PLUGIN_UTIL_H__ |
| 84 | 84 |
| OLD | NEW |