Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_EXTENSIONS_API_WEB_NAVIGATION_FRAME_NAVIGATION_STATE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_FRAME_NAVIGATION_STATE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_FRAME_NAVIGATION_STATE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_FRAME_NAVIGATION_STATE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 FrameNavigationState(); | 28 FrameNavigationState(); |
| 29 ~FrameNavigationState(); | 29 ~FrameNavigationState(); |
| 30 | 30 |
| 31 // Use these to iterate over all frame hosts known by this object. | 31 // Use these to iterate over all frame hosts known by this object. |
| 32 const_iterator begin() const { return frame_hosts_.begin(); } | 32 const_iterator begin() const { return frame_hosts_.begin(); } |
| 33 const_iterator end() const { return frame_hosts_.end(); } | 33 const_iterator end() const { return frame_hosts_.end(); } |
| 34 | 34 |
| 35 // True if navigation events for the given frame can be sent. | 35 // True if navigation events for the given frame can be sent. |
| 36 bool CanSendEvents(content::RenderFrameHost* frame_host) const; | 36 bool CanSendEvents(content::RenderFrameHost* frame_host) const; |
| 37 | 37 |
| 38 // TODO(dcheng): This should be static. | |
| 39 // True if in general webNavigation events may be sent for the given URL. | 38 // True if in general webNavigation events may be sent for the given URL. |
| 40 bool IsValidUrl(const GURL& url) const; | 39 static bool IsValidUrl(const GURL& url); |
|
nasko
2015/05/14 17:00:41
static methods should be declared at the beginning
| |
| 41 | 40 |
| 42 // Starts to track a navigation in |frame_host| to |url|. | 41 // Starts to track a navigation in |frame_host| to |url|. |
| 43 void StartTrackingNavigation(content::RenderFrameHost* frame_host, | 42 void StartTrackingNavigation(content::RenderFrameHost* frame_host, |
| 44 const GURL& url, | 43 const GURL& url, |
| 45 bool is_error_page, | 44 bool is_error_page, |
| 46 bool is_iframe_srcdoc); | 45 bool is_iframe_srcdoc); |
| 47 | 46 |
| 48 // Adds the |frame_host| to the set of RenderFrameHosts associated with the | 47 // Adds the |frame_host| to the set of RenderFrameHosts associated with the |
| 49 // WebContents this object is tracking. This method and FrameHostDeleted | 48 // WebContents this object is tracking. This method and FrameHostDeleted |
| 50 // are used to track the set of current RenderFrameHosts, which is used to | 49 // are used to track the set of current RenderFrameHosts, which is used to |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 | 126 |
| 128 // If true, also allow events from chrome-extension:// URLs. | 127 // If true, also allow events from chrome-extension:// URLs. |
| 129 static bool allow_extension_scheme_; | 128 static bool allow_extension_scheme_; |
| 130 | 129 |
| 131 DISALLOW_COPY_AND_ASSIGN(FrameNavigationState); | 130 DISALLOW_COPY_AND_ASSIGN(FrameNavigationState); |
| 132 }; | 131 }; |
| 133 | 132 |
| 134 } // namespace extensions | 133 } // namespace extensions |
| 135 | 134 |
| 136 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_FRAME_NAVIGATION_STATE_H _ | 135 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_FRAME_NAVIGATION_STATE_H _ |
| OLD | NEW |