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

Side by Side Diff: chrome/browser/geolocation/chrome_geolocation_permission_context.h

Issue 11590002: Destroy GeolocationInfobarQueueController on UI thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/geolocation/chrome_geolocation_permission_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_
6 #define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_ 6 #define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 17 matching lines...) Expand all
28 int render_view_id, 28 int render_view_id,
29 int bridge_id, 29 int bridge_id,
30 const GURL& requesting_frame, 30 const GURL& requesting_frame,
31 base::Callback<void(bool)> callback) OVERRIDE; 31 base::Callback<void(bool)> callback) OVERRIDE;
32 virtual void CancelGeolocationPermissionRequest( 32 virtual void CancelGeolocationPermissionRequest(
33 int render_process_id, 33 int render_process_id,
34 int render_view_id, 34 int render_view_id,
35 int bridge_id, 35 int bridge_id,
36 const GURL& requesting_frame) OVERRIDE; 36 const GURL& requesting_frame) OVERRIDE;
37 37
38 // Called on the UI thread when the profile is about to be destroyed.
39 void ShutdownOnUIThread();
40
38 protected: 41 protected:
39 virtual ~ChromeGeolocationPermissionContext(); 42 virtual ~ChromeGeolocationPermissionContext();
40 43
41 Profile* profile() const { return profile_; } 44 Profile* profile() const { return profile_; }
42 45
43 // Return an instance of the infobar queue controller, creating it 46 // Return an instance of the infobar queue controller, creating it
44 // if necessary. 47 // if necessary.
45 GeolocationInfoBarQueueController* QueueController(); 48 GeolocationInfoBarQueueController* QueueController();
46 49
47 // Notifies whether or not the corresponding bridge is allowed to use 50 // Notifies whether or not the corresponding bridge is allowed to use
(...skipping 26 matching lines...) Expand all
74 bool allowed); 77 bool allowed);
75 78
76 // Create an InfoBarQueueController. overriden in derived classes to provide 79 // Create an InfoBarQueueController. overriden in derived classes to provide
77 // additional UI flow. Called on the UI thread. 80 // additional UI flow. Called on the UI thread.
78 virtual GeolocationInfoBarQueueController* CreateQueueController(); 81 virtual GeolocationInfoBarQueueController* CreateQueueController();
79 82
80 private: 83 private:
81 // Removes any pending InfoBar request. 84 // Removes any pending InfoBar request.
82 void CancelPendingInfoBarRequest(const GeolocationPermissionRequestID& id); 85 void CancelPendingInfoBarRequest(const GeolocationPermissionRequestID& id);
83 86
84 // This must only be accessed from the UI thread. 87 // These must only be accessed from the UI thread.
85 Profile* const profile_; 88 Profile* const profile_;
86 89 bool shutting_down_;
87 scoped_ptr<GeolocationInfoBarQueueController> 90 scoped_ptr<GeolocationInfoBarQueueController>
88 geolocation_infobar_queue_controller_; 91 geolocation_infobar_queue_controller_;
bulach 2013/01/10 10:38:44 nit: I think this needs indenting.
John Knottenbelt 2013/01/10 15:16:26 Done.
89 92
90 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContext); 93 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContext);
91 }; 94 };
92 95
93 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_ 96 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/geolocation/chrome_geolocation_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698