OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ |
6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ | 6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Called when GetPlatformPathFromFileSystemURL() finishes. | 62 // Called when GetPlatformPathFromFileSystemURL() finishes. |
63 void GetPlatformPathCallback( | 63 void GetPlatformPathCallback( |
64 const GetPlatformPathCB& callback, const std::string& platform_path); | 64 const GetPlatformPathCB& callback, const std::string& platform_path); |
65 | 65 |
66 // BrowserContext to retrieve URLRequestContext and ResourceContext. | 66 // BrowserContext to retrieve URLRequestContext and ResourceContext. |
67 BrowserContext* browser_context_; | 67 BrowserContext* browser_context_; |
68 | 68 |
69 // FileSystemContext to be used on FILE thread. | 69 // FileSystemContext to be used on FILE thread. |
70 fileapi::FileSystemContext* file_system_context_; | 70 fileapi::FileSystemContext* file_system_context_; |
71 | 71 |
72 // Used to post tasks. | |
73 base::WeakPtrFactory<MediaResourceGetterImpl> weak_this_; | |
74 | |
75 // Render process id, used to check whether the process can access cookies. | 72 // Render process id, used to check whether the process can access cookies. |
76 int renderer_id_; | 73 int renderer_id_; |
77 | 74 |
78 // Routing id for the render view, used to check tab specific cookie policy. | 75 // Routing id for the render view, used to check tab specific cookie policy. |
79 int routing_id_; | 76 int routing_id_; |
80 | 77 |
| 78 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 79 base::WeakPtrFactory<MediaResourceGetterImpl> weak_factory_; |
| 80 |
81 DISALLOW_COPY_AND_ASSIGN(MediaResourceGetterImpl); | 81 DISALLOW_COPY_AND_ASSIGN(MediaResourceGetterImpl); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace content | 84 } // namespace content |
85 | 85 |
86 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ | 86 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ |
OLD | NEW |