| 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_CHROME_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| 6 #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "chrome/common/chrome_version_info.h" | 17 #include "chrome/common/chrome_version_info.h" |
| 18 #include "content/public/browser/content_browser_client.h" | 18 #include "content/public/browser/content_browser_client.h" |
| 19 | 19 |
| 20 class ChromeContentBrowserClientParts; | 20 class ChromeContentBrowserClientParts; |
| 21 class PermissionContextBase; |
| 22 class Profile; |
| 21 | 23 |
| 22 namespace base { | 24 namespace base { |
| 23 class CommandLine; | 25 class CommandLine; |
| 24 } | 26 } |
| 25 | 27 |
| 26 namespace content { | 28 namespace content { |
| 27 class QuotaPermissionContext; | 29 class QuotaPermissionContext; |
| 28 } | 30 } |
| 29 | 31 |
| 30 namespace extensions { | 32 namespace extensions { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 content::WebContents* web_contents, | 189 content::WebContents* web_contents, |
| 188 int bridge_id, | 190 int bridge_id, |
| 189 const GURL& requesting_frame, | 191 const GURL& requesting_frame, |
| 190 bool user_gesture, | 192 bool user_gesture, |
| 191 const base::Callback<void(bool)>& result_callback) override; | 193 const base::Callback<void(bool)>& result_callback) override; |
| 192 content::PermissionStatus GetPermissionStatus( | 194 content::PermissionStatus GetPermissionStatus( |
| 193 content::PermissionType permission, | 195 content::PermissionType permission, |
| 194 content::BrowserContext* browser_context, | 196 content::BrowserContext* browser_context, |
| 195 const GURL& requesting_origin, | 197 const GURL& requesting_origin, |
| 196 const GURL& embedding_origin) override; | 198 const GURL& embedding_origin) override; |
| 199 content::PermissionStatus RevokePermission( |
| 200 content::PermissionType permission, |
| 201 content::BrowserContext* browser_context, |
| 202 const GURL& requesting_origin, |
| 203 const GURL& embedding_origin) override; |
| 197 void CancelPermissionRequest(content::PermissionType permission, | 204 void CancelPermissionRequest(content::PermissionType permission, |
| 198 content::WebContents* web_contents, | 205 content::WebContents* web_contents, |
| 199 int bridge_id, | 206 int bridge_id, |
| 200 const GURL& requesting_frame) override; | 207 const GURL& requesting_frame) override; |
| 201 void RegisterPermissionUsage(content::PermissionType permission, | 208 void RegisterPermissionUsage(content::PermissionType permission, |
| 202 content::WebContents* web_contents, | 209 content::WebContents* web_contents, |
| 203 const GURL& frame_url, | 210 const GURL& frame_url, |
| 204 const GURL& main_frame_url) override; | 211 const GURL& main_frame_url) override; |
| 205 bool CanCreateWindow(const GURL& opener_url, | 212 bool CanCreateWindow(const GURL& opener_url, |
| 206 const GURL& opener_top_level_frame_url, | 213 const GURL& opener_top_level_frame_url, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 const base::CommandLine& from_command_line, | 290 const base::CommandLine& from_command_line, |
| 284 VersionInfo::Channel channel); | 291 VersionInfo::Channel channel); |
| 285 #endif | 292 #endif |
| 286 | 293 |
| 287 void FileSystemAccessed( | 294 void FileSystemAccessed( |
| 288 const GURL& url, | 295 const GURL& url, |
| 289 const std::vector<std::pair<int, int> >& render_frames, | 296 const std::vector<std::pair<int, int> >& render_frames, |
| 290 base::Callback<void(bool)> callback, | 297 base::Callback<void(bool)> callback, |
| 291 bool allow); | 298 bool allow); |
| 292 | 299 |
| 300 // Returns |
| 301 PermissionContextBase* GetPermissionContextFromProfile( |
| 302 Profile* profile, |
| 303 content::PermissionType permission); |
| 304 |
| 293 #if defined(ENABLE_EXTENSIONS) | 305 #if defined(ENABLE_EXTENSIONS) |
| 294 void GuestPermissionRequestHelper( | 306 void GuestPermissionRequestHelper( |
| 295 const GURL& url, | 307 const GURL& url, |
| 296 const std::vector<std::pair<int, int> >& render_frames, | 308 const std::vector<std::pair<int, int> >& render_frames, |
| 297 base::Callback<void(bool)> callback, | 309 base::Callback<void(bool)> callback, |
| 298 bool allow); | 310 bool allow); |
| 299 | 311 |
| 300 static void RequestFileSystemPermissionOnUIThread( | 312 static void RequestFileSystemPermissionOnUIThread( |
| 301 int render_process_id, | 313 int render_process_id, |
| 302 int render_frame_id, | 314 int render_frame_id, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 328 std::vector<ChromeContentBrowserClientParts*> extra_parts_; | 340 std::vector<ChromeContentBrowserClientParts*> extra_parts_; |
| 329 | 341 |
| 330 base::WeakPtrFactory<ChromeContentBrowserClient> weak_factory_; | 342 base::WeakPtrFactory<ChromeContentBrowserClient> weak_factory_; |
| 331 | 343 |
| 332 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 344 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
| 333 }; | 345 }; |
| 334 | 346 |
| 335 } // namespace chrome | 347 } // namespace chrome |
| 336 | 348 |
| 337 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 349 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |