Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/chrome_content_browser_client.h

Issue 356543003: Audit the last usage of Geolocation and Notification permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update the utils. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/common/chrome_version_info.h" 15 #include "chrome/common/chrome_version_info.h"
16 #include "content/public/browser/content_browser_client.h" 16 #include "content/public/browser/content_browser_client.h"
17 17
18 #if defined(OS_ANDROID) 18 #if defined(OS_ANDROID)
Bernhard Bauer 2014/07/14 10:50:32 While you're here, this file could use some love..
Daniel Nishi 2014/07/14 17:12:53 Done.
19 #include "base/memory/scoped_ptr.h" 19 #include "base/memory/scoped_ptr.h"
20 #endif 20 #endif
21 21
22 class Profile;
Bernhard Bauer 2014/07/14 10:50:32 This is unnecessary.
Daniel Nishi 2014/07/14 17:12:54 Removed.
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 {
31 class BrowserPermissionsPolicyDelegate; 33 class BrowserPermissionsPolicyDelegate;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 bool user_gesture, 208 bool user_gesture,
207 base::Callback<void(bool)> result_callback, 209 base::Callback<void(bool)> result_callback,
208 base::Closure* cancel_callback) OVERRIDE; 210 base::Closure* cancel_callback) OVERRIDE;
209 virtual void RequestMidiSysExPermission( 211 virtual void RequestMidiSysExPermission(
210 content::WebContents* web_contents, 212 content::WebContents* web_contents,
211 int bridge_id, 213 int bridge_id,
212 const GURL& requesting_frame, 214 const GURL& requesting_frame,
213 bool user_gesture, 215 bool user_gesture,
214 base::Callback<void(bool)> result_callback, 216 base::Callback<void(bool)> result_callback,
215 base::Closure* cancel_callback) OVERRIDE; 217 base::Closure* cancel_callback) OVERRIDE;
218 virtual void UseContentSettingPermission(
219 content::WebContents* web_contents,
220 const GURL& primary_url,
221 const GURL& secondary_url,
222 const std::string& setting_type) OVERRIDE;
216 virtual void RequestProtectedMediaIdentifierPermission( 223 virtual void RequestProtectedMediaIdentifierPermission(
217 content::WebContents* web_contents, 224 content::WebContents* web_contents,
218 const GURL& origin, 225 const GURL& origin,
219 base::Callback<void(bool)> result_callback, 226 base::Callback<void(bool)> result_callback,
220 base::Closure* cancel_callback) OVERRIDE; 227 base::Closure* cancel_callback) OVERRIDE;
221 virtual bool CanCreateWindow(const GURL& opener_url, 228 virtual bool CanCreateWindow(const GURL& opener_url,
222 const GURL& opener_top_level_frame_url, 229 const GURL& opener_top_level_frame_url,
223 const GURL& source_origin, 230 const GURL& source_origin,
224 WindowContainerType container_type, 231 WindowContainerType container_type,
225 const GURL& target_url, 232 const GURL& target_url,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 private: 304 private:
298 #if defined(ENABLE_WEBRTC) 305 #if defined(ENABLE_WEBRTC)
299 // Copies disable WebRTC encryption switch depending on the channel. 306 // Copies disable WebRTC encryption switch depending on the channel.
300 static void MaybeCopyDisableWebRtcEncryptionSwitch( 307 static void MaybeCopyDisableWebRtcEncryptionSwitch(
301 base::CommandLine* to_command_line, 308 base::CommandLine* to_command_line,
302 const base::CommandLine& from_command_line, 309 const base::CommandLine& from_command_line,
303 VersionInfo::Channel channel); 310 VersionInfo::Channel channel);
304 #endif 311 #endif
305 312
306 void FileSystemAccessed( 313 void FileSystemAccessed(
307 const GURL& url, 314 const GURL& url,
Bernhard Bauer 2014/07/14 10:50:32 Needs to be indented two more spaces.
Daniel Nishi 2014/07/14 17:12:54 Done.
308 const std::vector<std::pair<int, int> >& render_frames, 315 const std::vector<std::pair<int, int> >& render_frames,
309 base::Callback<void(bool)> callback, 316 base::Callback<void(bool)> callback,
310 bool allow); 317 bool allow);
311 318
312 #if defined(ENABLE_EXTENSIONS) 319 #if defined(ENABLE_EXTENSIONS)
313 void GuestPermissionRequestHelper( 320 void GuestPermissionRequestHelper(
Bernhard Bauer 2014/07/14 10:50:32 Two more spaces (also below)
Daniel Nishi 2014/07/14 17:12:54 Done.
314 const GURL& url, 321 const GURL& url,
315 const std::vector<std::pair<int, int> >& render_frames, 322 const std::vector<std::pair<int, int> >& render_frames,
316 base::Callback<void(bool)> callback, 323 base::Callback<void(bool)> callback,
317 bool allow); 324 bool allow);
318 325
319 static void RequestFileSystemPermissionOnUIThread( 326 static void RequestFileSystemPermissionOnUIThread(
320 int render_process_id, 327 int render_process_id,
321 int render_frame_id, 328 int render_frame_id,
322 const GURL& url, 329 const GURL& url,
323 bool allowed_by_default, 330 bool allowed_by_default,
(...skipping 13 matching lines...) Expand all
337 permissions_policy_delegate_; 344 permissions_policy_delegate_;
338 345
339 // The prerender tracker used to determine whether a render process is used 346 // The prerender tracker used to determine whether a render process is used
340 // for prerendering and an override cookie store must be provided. 347 // for prerendering and an override cookie store must be provided.
341 // This needs to be kept as a member rather than just looked up from 348 // This needs to be kept as a member rather than just looked up from
342 // the profile due to initialization ordering, as well as due to threading. 349 // the profile due to initialization ordering, as well as due to threading.
343 // It is initialized on the UI thread when the ResoureDispatcherHost is 350 // It is initialized on the UI thread when the ResoureDispatcherHost is
344 // created. It is used only the IO thread. 351 // created. It is used only the IO thread.
345 prerender::PrerenderTracker* prerender_tracker_; 352 prerender::PrerenderTracker* prerender_tracker_;
346 353
347 base::WeakPtrFactory<ChromeContentBrowserClient> weak_factory_; 354 base::WeakPtrFactory<ChromeContentBrowserClient> weak_factory_;
Bernhard Bauer 2014/07/14 10:50:32 One less space.
Daniel Nishi 2014/07/14 17:12:54 Done.
348 355
349 friend class DisableWebRtcEncryptionFlagTest; 356 friend class DisableWebRtcEncryptionFlagTest;
Bernhard Bauer 2014/07/14 10:50:32 friend declarations go right after private:
Daniel Nishi 2014/07/14 17:12:54 Done.
350 357
351 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); 358 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient);
352 }; 359 };
353 360
354 } // namespace chrome 361 } // namespace chrome
355 362
356 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ 363 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698