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

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

Issue 3305004: Fix geolocation icon behaviour on navigation (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 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
« no previous file with comments | « no previous file | chrome/browser/geolocation/geolocation_settings_state.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_GEOLOCATION_SETTINGS_STATE_H_ 5 #ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_SETTINGS_STATE_H_
6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_SETTINGS_STATE_H_ 6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_SETTINGS_STATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 15 matching lines...) Expand all
26 return state_map_; 26 return state_map_;
27 } 27 }
28 28
29 // Sets the state for |requesting_origin|. 29 // Sets the state for |requesting_origin|.
30 void OnGeolocationPermissionSet(const GURL& requesting_origin, bool allowed); 30 void OnGeolocationPermissionSet(const GURL& requesting_origin, bool allowed);
31 31
32 // Delegated by TabContents to indicate a navigation has happened and we 32 // Delegated by TabContents to indicate a navigation has happened and we
33 // may need to clear our settings. 33 // may need to clear our settings.
34 void DidNavigate(const NavigationController::LoadCommittedDetails& details); 34 void DidNavigate(const NavigationController::LoadCommittedDetails& details);
35 35
36 void ClearStateMap();
37
36 enum TabState { 38 enum TabState {
37 TABSTATE_NONE = 0, 39 TABSTATE_NONE = 0,
38 // There's at least one entry with non-default setting. 40 // There's at least one entry with non-default setting.
39 TABSTATE_HAS_EXCEPTION = 1 << 1, 41 TABSTATE_HAS_EXCEPTION = 1 << 1,
40 // There's at least one entry with a non-ASK setting. 42 // There's at least one entry with a non-ASK setting.
41 TABSTATE_HAS_ANY_ICON = 1 << 2, 43 TABSTATE_HAS_ANY_ICON = 1 << 2,
42 // There's at least one entry with ALLOWED setting. 44 // There's at least one entry with ALLOWED setting.
43 TABSTATE_HAS_ANY_ALLOWED = 1 << 3, 45 TABSTATE_HAS_ANY_ALLOWED = 1 << 3,
44 // There's at least one entry that doesn't match the saved setting. 46 // There's at least one entry that doesn't match the saved setting.
45 TABSTATE_HAS_CHANGED = 1 << 4, 47 TABSTATE_HAS_CHANGED = 1 << 4,
(...skipping 11 matching lines...) Expand all
57 std::string GURLToFormattedHost(const GURL& url) const; 59 std::string GURLToFormattedHost(const GURL& url) const;
58 60
59 Profile* profile_; 61 Profile* profile_;
60 StateMap state_map_; 62 StateMap state_map_;
61 GURL embedder_url_; 63 GURL embedder_url_;
62 64
63 DISALLOW_COPY_AND_ASSIGN(GeolocationSettingsState); 65 DISALLOW_COPY_AND_ASSIGN(GeolocationSettingsState);
64 }; 66 };
65 67
66 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_SETTINGS_STATE_H_ 68 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_SETTINGS_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/geolocation/geolocation_settings_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698