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

Side by Side Diff: chrome/browser/content_settings/permission_context_base.h

Issue 593153002: Restore the iframe behavior of notification permissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 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 CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_ 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_ 6 #define CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/containers/scoped_ptr_hash_map.h" 9 #include "base/containers/scoped_ptr_hash_map.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // Implementors can override this method to update the icons on the 92 // Implementors can override this method to update the icons on the
93 // url bar with the result of the new permission. 93 // url bar with the result of the new permission.
94 virtual void UpdateTabContext(const PermissionRequestID& id, 94 virtual void UpdateTabContext(const PermissionRequestID& id,
95 const GURL& requesting_origin, 95 const GURL& requesting_origin,
96 bool allowed) {} 96 bool allowed) {}
97 97
98 // Return an instance of the infobar queue controller, creating it if needed. 98 // Return an instance of the infobar queue controller, creating it if needed.
99 PermissionQueueController* GetQueueController(); 99 PermissionQueueController* GetQueueController();
100 100
101 // Store the decided permission as a content setting.
Bernhard Bauer 2014/09/23 16:13:01 Please add a comment that explains why this is vir
Miguel Garcia 2014/09/23 16:53:38 Done.
102 virtual void UpdateContentSetting(const GURL& requesting_origin,
103 const GURL& embedder_origin,
104 bool allowed);
105
101 private: 106 private:
102 void UpdateContentSetting(
103 const GURL& requesting_origin,
104 const GURL& embedder_origin,
105 bool allowed);
106 107
107 // Called when a bubble is no longer used so it can be cleaned up. 108 // Called when a bubble is no longer used so it can be cleaned up.
108 void CleanUpBubble(const PermissionRequestID& id); 109 void CleanUpBubble(const PermissionRequestID& id);
109 110
110 Profile* profile_; 111 Profile* profile_;
111 const ContentSettingsType permission_type_; 112 const ContentSettingsType permission_type_;
112 scoped_ptr<PermissionQueueController> permission_queue_controller_; 113 scoped_ptr<PermissionQueueController> permission_queue_controller_;
113 base::ScopedPtrHashMap<std::string, PermissionBubbleRequest> 114 base::ScopedPtrHashMap<std::string, PermissionBubbleRequest>
114 pending_bubbles_; 115 pending_bubbles_;
115 116
116 base::WeakPtrFactory<PermissionContextBase> weak_factory_; 117 base::WeakPtrFactory<PermissionContextBase> weak_factory_;
117 }; 118 };
118 119
119 #endif // CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_ 120 #endif // CHROME_BROWSER_CONTENT_SETTINGS_PERMISSION_CONTEXT_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698