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 CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
7 | 7 |
8 #include "base/process/kill.h" | 8 #include "base/process/kill.h" |
9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 119 |
120 // This method is invoked when the provisional load was successfully | 120 // This method is invoked when the provisional load was successfully |
121 // committed. The |render_view_host| is now the current RenderViewHost of the | 121 // committed. The |render_view_host| is now the current RenderViewHost of the |
122 // WebContents. | 122 // WebContents. |
123 // | 123 // |
124 // If the navigation only changed the reference fragment, or was triggered | 124 // If the navigation only changed the reference fragment, or was triggered |
125 // using the history API (e.g. window.history.replaceState), we will receive | 125 // using the history API (e.g. window.history.replaceState), we will receive |
126 // this signal without a prior DidStartProvisionalLoadForFrame signal. | 126 // this signal without a prior DidStartProvisionalLoadForFrame signal. |
127 virtual void DidCommitProvisionalLoadForFrame( | 127 virtual void DidCommitProvisionalLoadForFrame( |
128 int64 frame_id, | 128 int64 frame_id, |
129 const string16& frame_unique_name, | 129 const base::string16& frame_unique_name, |
130 bool is_main_frame, | 130 bool is_main_frame, |
131 const GURL& url, | 131 const GURL& url, |
132 PageTransition transition_type, | 132 PageTransition transition_type, |
133 RenderViewHost* render_view_host) {} | 133 RenderViewHost* render_view_host) {} |
134 | 134 |
135 // This method is invoked when the provisional load failed. | 135 // This method is invoked when the provisional load failed. |
136 virtual void DidFailProvisionalLoad(int64 frame_id, | 136 virtual void DidFailProvisionalLoad(int64 frame_id, |
137 const string16& frame_unique_name, | 137 const base::string16& frame_unique_name, |
138 bool is_main_frame, | 138 bool is_main_frame, |
139 const GURL& validated_url, | 139 const GURL& validated_url, |
140 int error_code, | 140 int error_code, |
141 const string16& error_description, | 141 const base::string16& error_description, |
142 RenderViewHost* render_view_host) {} | 142 RenderViewHost* render_view_host) {} |
143 | 143 |
144 // If the provisional load corresponded to the main frame, this method is | 144 // If the provisional load corresponded to the main frame, this method is |
145 // invoked in addition to DidCommitProvisionalLoadForFrame. | 145 // invoked in addition to DidCommitProvisionalLoadForFrame. |
146 virtual void DidNavigateMainFrame( | 146 virtual void DidNavigateMainFrame( |
147 const LoadCommittedDetails& details, | 147 const LoadCommittedDetails& details, |
148 const FrameNavigateParams& params) {} | 148 const FrameNavigateParams& params) {} |
149 | 149 |
150 // And regardless of what frame navigated, this method is invoked after | 150 // And regardless of what frame navigated, this method is invoked after |
151 // DidCommitProvisionalLoadForFrame was invoked. | 151 // DidCommitProvisionalLoadForFrame was invoked. |
(...skipping 25 matching lines...) Expand all Loading... |
177 const GURL& validated_url, | 177 const GURL& validated_url, |
178 bool is_main_frame, | 178 bool is_main_frame, |
179 RenderViewHost* render_view_host) {} | 179 RenderViewHost* render_view_host) {} |
180 | 180 |
181 // This method is like DidFinishLoad, but when the load failed or was | 181 // This method is like DidFinishLoad, but when the load failed or was |
182 // cancelled, e.g. window.stop() is invoked. | 182 // cancelled, e.g. window.stop() is invoked. |
183 virtual void DidFailLoad(int64 frame_id, | 183 virtual void DidFailLoad(int64 frame_id, |
184 const GURL& validated_url, | 184 const GURL& validated_url, |
185 bool is_main_frame, | 185 bool is_main_frame, |
186 int error_code, | 186 int error_code, |
187 const string16& error_description, | 187 const base::string16& error_description, |
188 RenderViewHost* render_view_host) {} | 188 RenderViewHost* render_view_host) {} |
189 | 189 |
190 // This method is invoked when content was loaded from an in-memory cache. | 190 // This method is invoked when content was loaded from an in-memory cache. |
191 virtual void DidLoadResourceFromMemoryCache( | 191 virtual void DidLoadResourceFromMemoryCache( |
192 const LoadFromMemoryCacheDetails& details) {} | 192 const LoadFromMemoryCacheDetails& details) {} |
193 | 193 |
194 // This method is invoked when a response has been received for a resource | 194 // This method is invoked when a response has been received for a resource |
195 // request. | 195 // request. |
196 virtual void DidGetResourceResponseStart( | 196 virtual void DidGetResourceResponseStart( |
197 const ResourceRequestDetails& details) {} | 197 const ResourceRequestDetails& details) {} |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 void WebContentsImplDestroyed(); | 342 void WebContentsImplDestroyed(); |
343 | 343 |
344 WebContentsImpl* web_contents_; | 344 WebContentsImpl* web_contents_; |
345 | 345 |
346 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 346 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
347 }; | 347 }; |
348 | 348 |
349 } // namespace content | 349 } // namespace content |
350 | 350 |
351 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 351 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |