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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.h

Issue 10584042: Bring up a content settings icon for ungestured registerProtocolHandler call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/tab_specific_content_settings.h
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h
index ab3719db04ee4c2c6c8d965f269aad9f0e30209a..3a30a1c4e4b5fd7362f9ae77805032125c0c444a 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.h
+++ b/chrome/browser/content_settings/tab_specific_content_settings.h
@@ -17,6 +17,7 @@
#include "chrome/browser/geolocation/geolocation_settings_state.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_types.h"
+#include "chrome/common/custom_handlers/protocol_handler.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
@@ -169,6 +170,26 @@ class TabSpecificContentSettings : public content::WebContentsObserver,
return geolocation_settings_state_;
}
+ void SetRegisterProtocolHandlerCalledUngestured(ProtocolHandler handler) {
koz (OOO until 15th September) 2012/06/21 01:50:53 This code could do with an explanatory comment. A
Greg Billock 2012/06/21 19:59:11 Done.
+ register_protocol_handler_called_ungestured_ = handler;
+ }
+
+ bool IsRegisterProtocolHandlerCalledUngestured() const {
koz (OOO until 15th September) 2012/06/21 01:50:53 IsRegisterProtocolHandlerPending()?
Greg Billock 2012/06/21 19:59:11 Killed this in favor of just doing PendingProtocol
+ return !register_protocol_handler_called_ungestured_.IsEmpty();
+ }
+
+ const ProtocolHandler& UngesturedProtocolHandler() const {
koz (OOO until 15th September) 2012/06/21 01:50:53 GetPendingProtocolHandler()
Greg Billock 2012/06/21 19:59:11 Done.
+ return register_protocol_handler_called_ungestured_;
+ }
+
+ void SetOldRegisterProtocolHandlerTitle(const string16 title) {
koz (OOO until 15th September) 2012/06/21 01:50:53 SetProtocolHandlerTitleToBeReplaced()?
Greg Billock 2012/06/21 19:59:11 Called this 'Previous'. Sound good?
koz (OOO until 15th September) 2012/06/21 23:03:50 Yep, sounds fine.
+ old_protocol_handler_title_ = title;
+ }
+
+ const string16& OldRegisterProtocolHandlerTitle() const {
koz (OOO until 15th September) 2012/06/21 01:50:53 GetProtocolHandlerTitleToBeReplaced()
Greg Billock 2012/06/21 19:59:11 Done.
+ return old_protocol_handler_title_;
+ }
+
// Returns a pointer to the |LocalSharedObjectsContainer| that contains all
// allowed local shared objects like cookies, local storage, ... .
const LocalSharedObjectsContainer& allowed_local_shared_objects() const {
@@ -280,6 +301,15 @@ class TabSpecificContentSettings : public content::WebContentsObserver,
// Manages information about Geolocation API usage in this page.
GeolocationSettingsState geolocation_settings_state_;
+ // Set to the registered protocol descriptor if registerProtocolHandler was
koz (OOO until 15th September) 2012/06/21 01:50:53 Maybe rephrase as "The protocol handler that is pe
Greg Billock 2012/06/21 19:59:11 I like it. Making all these changes.
+ // called on this tab without a user gesture. The |IsEmpty| method will
+ // be true if no registration was performed.
+ ProtocolHandler register_protocol_handler_called_ungestured_;
koz (OOO until 15th September) 2012/06/21 01:50:53 If the above name changes are followed, this could
Greg Billock 2012/06/21 19:59:11 Done.
+
+ // If there is an old protocol handler, this is the title. (Used for the
koz (OOO until 15th September) 2012/06/21 01:50:53 Maybe rephrase this as "The title of the protocol
Greg Billock 2012/06/21 19:59:11 Done.
+ // message prompt.)
+ string16 old_protocol_handler_title_;
koz (OOO until 15th September) 2012/06/21 01:50:53 protocol_handler_to_be_replaced_title_? Also, con
Greg Billock 2012/06/21 19:59:11 At this point I don't think we need the whole thin
+
// Stores whether the user can load blocked plugins on this page.
bool load_plugins_link_enabled_;

Powered by Google App Engine
This is Rietveld 408576698