OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ANDROID_WEBVIEW_NATIVE_PERMISSION_PERMISSION_REQUEST_HANDLER_H | 5 #ifndef ANDROID_WEBVIEW_NATIVE_PERMISSION_PERMISSION_REQUEST_HANDLER_H |
6 #define ANDROID_WEBVIEW_NATIVE_PERMISSION_PERMISSION_REQUEST_HANDLER_H | 6 #define ANDROID_WEBVIEW_NATIVE_PERMISSION_PERMISSION_REQUEST_HANDLER_H |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 void SendRequest(scoped_ptr<AwPermissionRequestDelegate> request); | 33 void SendRequest(scoped_ptr<AwPermissionRequestDelegate> request); |
34 | 34 |
35 // Cancel the ongoing request initiated by |origin| for accessing |resources|. | 35 // Cancel the ongoing request initiated by |origin| for accessing |resources|. |
36 void CancelRequest(const GURL& origin, int64 resources); | 36 void CancelRequest(const GURL& origin, int64 resources); |
37 | 37 |
38 // Allow |origin| to access the |resources|. | 38 // Allow |origin| to access the |resources|. |
39 void PreauthorizePermission(const GURL& origin, int64 resources); | 39 void PreauthorizePermission(const GURL& origin, int64 resources); |
40 | 40 |
41 // WebContentsObserver | 41 // WebContentsObserver |
42 virtual void NavigationEntryCommitted( | 42 virtual void NavigationEntryCommitted( |
43 const content::LoadCommittedDetails& load_details) OVERRIDE; | 43 const content::LoadCommittedDetails& load_details) override; |
44 | 44 |
45 private: | 45 private: |
46 friend class TestPermissionRequestHandler; | 46 friend class TestPermissionRequestHandler; |
47 | 47 |
48 typedef std::vector<base::WeakPtr<AwPermissionRequest> >::iterator | 48 typedef std::vector<base::WeakPtr<AwPermissionRequest> >::iterator |
49 RequestIterator; | 49 RequestIterator; |
50 | 50 |
51 // Return the request initiated by |origin| for accessing |resources|. | 51 // Return the request initiated by |origin| for accessing |resources|. |
52 RequestIterator FindRequest(const GURL& origin, int64 resources); | 52 RequestIterator FindRequest(const GURL& origin, int64 resources); |
53 | 53 |
(...skipping 18 matching lines...) Expand all Loading... |
72 // The unique id of the active NavigationEntry of the WebContents that we were | 72 // The unique id of the active NavigationEntry of the WebContents that we were |
73 // opened for. Used to help expire on requests. | 73 // opened for. Used to help expire on requests. |
74 int contents_unique_id_; | 74 int contents_unique_id_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(PermissionRequestHandler); | 76 DISALLOW_COPY_AND_ASSIGN(PermissionRequestHandler); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace android_webivew | 79 } // namespace android_webivew |
80 | 80 |
81 #endif // ANDROID_WEBVIEW_NATIVE_PERMISSION_PERMISSION_REQUEST_HANDLER_H | 81 #endif // ANDROID_WEBVIEW_NATIVE_PERMISSION_PERMISSION_REQUEST_HANDLER_H |
OLD | NEW |