| 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 CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/sequenced_task_runner_helpers.h" | 13 #include "base/sequenced_task_runner_helpers.h" |
| 14 #include "content/public/browser/browser_message_filter.h" | 14 #include "content/public/browser/browser_message_filter.h" |
| 15 #include "extensions/features/features.h" |
| 15 | 16 |
| 16 class GURL; | 17 class GURL; |
| 17 class Profile; | 18 class Profile; |
| 18 | 19 |
| 19 namespace blink { | 20 namespace blink { |
| 20 enum class WebNavigationHintType; | 21 enum class WebNavigationHintType; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace chrome_browser_net { | 24 namespace chrome_browser_net { |
| 24 class Predictor; | 25 class Predictor; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 bool* allowed); | 78 bool* allowed); |
| 78 void OnAllowDOMStorage(int render_frame_id, | 79 void OnAllowDOMStorage(int render_frame_id, |
| 79 const GURL& origin_url, | 80 const GURL& origin_url, |
| 80 const GURL& top_origin_url, | 81 const GURL& top_origin_url, |
| 81 bool local, | 82 bool local, |
| 82 bool* allowed); | 83 bool* allowed); |
| 83 void OnRequestFileSystemAccessSync(int render_frame_id, | 84 void OnRequestFileSystemAccessSync(int render_frame_id, |
| 84 const GURL& origin_url, | 85 const GURL& origin_url, |
| 85 const GURL& top_origin_url, | 86 const GURL& top_origin_url, |
| 86 IPC::Message* message); | 87 IPC::Message* message); |
| 87 #if defined(ENABLE_EXTENSIONS) | 88 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 88 static void FileSystemAccessedSyncOnUIThread( | 89 static void FileSystemAccessedSyncOnUIThread( |
| 89 int render_process_id, | 90 int render_process_id, |
| 90 int render_frame_id, | 91 int render_frame_id, |
| 91 const GURL& url, | 92 const GURL& url, |
| 92 bool blocked_by_policy, | 93 bool blocked_by_policy, |
| 93 IPC::Message* reply_msg); | 94 IPC::Message* reply_msg); |
| 94 #endif | 95 #endif |
| 95 void OnRequestFileSystemAccessAsync(int render_frame_id, | 96 void OnRequestFileSystemAccessAsync(int render_frame_id, |
| 96 int request_id, | 97 int request_id, |
| 97 const GURL& origin_url, | 98 const GURL& origin_url, |
| 98 const GURL& top_origin_url); | 99 const GURL& top_origin_url); |
| 99 void OnRequestFileSystemAccessSyncResponse(IPC::Message* reply_msg, | 100 void OnRequestFileSystemAccessSyncResponse(IPC::Message* reply_msg, |
| 100 bool allowed); | 101 bool allowed); |
| 101 void OnRequestFileSystemAccessAsyncResponse(int render_frame_id, | 102 void OnRequestFileSystemAccessAsyncResponse(int render_frame_id, |
| 102 int request_id, | 103 int request_id, |
| 103 bool allowed); | 104 bool allowed); |
| 104 void OnRequestFileSystemAccess(int render_frame_id, | 105 void OnRequestFileSystemAccess(int render_frame_id, |
| 105 const GURL& origin_url, | 106 const GURL& origin_url, |
| 106 const GURL& top_origin_url, | 107 const GURL& top_origin_url, |
| 107 base::Callback<void(bool)> callback); | 108 base::Callback<void(bool)> callback); |
| 108 #if defined(ENABLE_EXTENSIONS) | 109 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 109 static void FileSystemAccessedOnUIThread(int render_process_id, | 110 static void FileSystemAccessedOnUIThread(int render_process_id, |
| 110 int render_frame_id, | 111 int render_frame_id, |
| 111 const GURL& url, | 112 const GURL& url, |
| 112 bool allowed, | 113 bool allowed, |
| 113 base::Callback<void(bool)> callback); | 114 base::Callback<void(bool)> callback); |
| 114 static void FileSystemAccessedResponse(int render_process_id, | 115 static void FileSystemAccessedResponse(int render_process_id, |
| 115 int render_frame_id, | 116 int render_frame_id, |
| 116 const GURL& url, | 117 const GURL& url, |
| 117 base::Callback<void(bool)> callback, | 118 base::Callback<void(bool)> callback, |
| 118 bool allowed); | 119 bool allowed); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 142 // Used to look up permissions at database creation time. | 143 // Used to look up permissions at database creation time. |
| 143 scoped_refptr<content_settings::CookieSettings> cookie_settings_; | 144 scoped_refptr<content_settings::CookieSettings> cookie_settings_; |
| 144 | 145 |
| 145 // Used to start Service Workers for navigation hints. | 146 // Used to start Service Workers for navigation hints. |
| 146 content::ServiceWorkerContext* service_worker_context_; | 147 content::ServiceWorkerContext* service_worker_context_; |
| 147 | 148 |
| 148 DISALLOW_COPY_AND_ASSIGN(ChromeRenderMessageFilter); | 149 DISALLOW_COPY_AND_ASSIGN(ChromeRenderMessageFilter); |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ | 152 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ |
| OLD | NEW |