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_AUTOMATION_AUTOMATION_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_TAB_HELPER_H_ |
6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_TAB_HELPER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 private: | 99 private: |
100 friend class AutomationTabHelperTest; | 100 friend class AutomationTabHelperTest; |
101 | 101 |
102 void OnSnapshotEntirePageACK( | 102 void OnSnapshotEntirePageACK( |
103 bool success, | 103 bool success, |
104 const std::vector<unsigned char>& png_data, | 104 const std::vector<unsigned char>& png_data, |
105 const std::string& error_msg); | 105 const std::string& error_msg); |
106 | 106 |
107 // content::WebContentsObserver implementation. | 107 // content::WebContentsObserver implementation. |
108 virtual void DidStartLoading() OVERRIDE; | 108 virtual void DidStartLoading( |
109 virtual void DidStopLoading() OVERRIDE; | 109 content::RenderViewHost* render_view_host) OVERRIDE; |
| 110 virtual void DidStopLoading( |
| 111 content::RenderViewHost* render_view_host) OVERRIDE; |
110 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 112 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
111 virtual void WebContentsDestroyed( | 113 virtual void WebContentsDestroyed( |
112 content::WebContents* web_contents) OVERRIDE; | 114 content::WebContents* web_contents) OVERRIDE; |
113 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 115 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
114 | 116 |
115 void OnWillPerformClientRedirect(int64 frame_id, double delay_seconds); | 117 void OnWillPerformClientRedirect(int64 frame_id, double delay_seconds); |
116 void OnDidCompleteOrCancelClientRedirect(int64 frame_id); | 118 void OnDidCompleteOrCancelClientRedirect(int64 frame_id); |
117 void OnTabOrRenderViewDestroyed(content::WebContents* web_contents); | 119 void OnTabOrRenderViewDestroyed(content::WebContents* web_contents); |
118 | 120 |
119 // True if the tab is currently loading. If a navigation is scheduled but not | 121 // True if the tab is currently loading. If a navigation is scheduled but not |
120 // yet loading, this will be false. | 122 // yet loading, this will be false. |
121 bool is_loading_; | 123 bool is_loading_; |
122 | 124 |
123 // Set of all the frames (by frame ID) that are scheduled to perform a client | 125 // Set of all the frames (by frame ID) that are scheduled to perform a client |
124 // redirect. | 126 // redirect. |
125 std::set<int64> pending_client_redirects_; | 127 std::set<int64> pending_client_redirects_; |
126 | 128 |
127 // List of all the |TabEventObserver|s, which we broadcast events to. | 129 // List of all the |TabEventObserver|s, which we broadcast events to. |
128 ObserverList<TabEventObserver> observers_; | 130 ObserverList<TabEventObserver> observers_; |
129 | 131 |
130 DISALLOW_COPY_AND_ASSIGN(AutomationTabHelper); | 132 DISALLOW_COPY_AND_ASSIGN(AutomationTabHelper); |
131 }; | 133 }; |
132 | 134 |
133 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_TAB_HELPER_H_ | 135 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_TAB_HELPER_H_ |
OLD | NEW |