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" |
11 #include "content/public/browser/navigation_controller.h" | 11 #include "content/public/browser/navigation_controller.h" |
12 #include "content/public/common/frame_navigate_params.h" | 12 #include "content/public/common/frame_navigate_params.h" |
13 #include "content/public/common/page_transition_types.h" | |
14 #include "ipc/ipc_listener.h" | 13 #include "ipc/ipc_listener.h" |
15 #include "ipc/ipc_sender.h" | 14 #include "ipc/ipc_sender.h" |
16 #include "third_party/skia/include/core/SkColor.h" | 15 #include "third_party/skia/include/core/SkColor.h" |
| 16 #include "ui/base/page_transition_types.h" |
17 #include "ui/base/window_open_disposition.h" | 17 #include "ui/base/window_open_disposition.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 class NavigationEntry; | 21 class NavigationEntry; |
22 class RenderFrameHost; | 22 class RenderFrameHost; |
23 class RenderViewHost; | 23 class RenderViewHost; |
24 class WebContents; | 24 class WebContents; |
25 class WebContentsImpl; | 25 class WebContentsImpl; |
26 struct AXEventNotificationDetails; | 26 struct AXEventNotificationDetails; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 147 |
148 // This method is invoked when the provisional load was successfully | 148 // This method is invoked when the provisional load was successfully |
149 // committed. | 149 // committed. |
150 // | 150 // |
151 // If the navigation only changed the reference fragment, or was triggered | 151 // If the navigation only changed the reference fragment, or was triggered |
152 // using the history API (e.g. window.history.replaceState), we will receive | 152 // using the history API (e.g. window.history.replaceState), we will receive |
153 // this signal without a prior DidStartProvisionalLoadForFrame signal. | 153 // this signal without a prior DidStartProvisionalLoadForFrame signal. |
154 virtual void DidCommitProvisionalLoadForFrame( | 154 virtual void DidCommitProvisionalLoadForFrame( |
155 RenderFrameHost* render_frame_host, | 155 RenderFrameHost* render_frame_host, |
156 const GURL& url, | 156 const GURL& url, |
157 PageTransition transition_type) {} | 157 ui::PageTransition transition_type) {} |
158 | 158 |
159 // This method is invoked when the provisional load failed. | 159 // This method is invoked when the provisional load failed. |
160 virtual void DidFailProvisionalLoad( | 160 virtual void DidFailProvisionalLoad( |
161 RenderFrameHost* render_frame_host, | 161 RenderFrameHost* render_frame_host, |
162 const GURL& validated_url, | 162 const GURL& validated_url, |
163 int error_code, | 163 int error_code, |
164 const base::string16& error_description) {} | 164 const base::string16& error_description) {} |
165 | 165 |
166 // If the provisional load corresponded to the main frame, this method is | 166 // If the provisional load corresponded to the main frame, this method is |
167 // invoked in addition to DidCommitProvisionalLoadForFrame. | 167 // invoked in addition to DidCommitProvisionalLoadForFrame. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 const LoadCommittedDetails& load_details) {} | 227 const LoadCommittedDetails& load_details) {} |
228 | 228 |
229 // This method is invoked when a new WebContents was created in response to | 229 // This method is invoked when a new WebContents was created in response to |
230 // an action in the observed WebContents, e.g. a link with target=_blank was | 230 // an action in the observed WebContents, e.g. a link with target=_blank was |
231 // clicked. The |source_frame_id| indicates in which frame the action took | 231 // clicked. The |source_frame_id| indicates in which frame the action took |
232 // place. | 232 // place. |
233 virtual void DidOpenRequestedURL(WebContents* new_contents, | 233 virtual void DidOpenRequestedURL(WebContents* new_contents, |
234 const GURL& url, | 234 const GURL& url, |
235 const Referrer& referrer, | 235 const Referrer& referrer, |
236 WindowOpenDisposition disposition, | 236 WindowOpenDisposition disposition, |
237 PageTransition transition, | 237 ui::PageTransition transition, |
238 int64 source_frame_id) {} | 238 int64 source_frame_id) {} |
239 | 239 |
240 virtual void FrameDetached(RenderFrameHost* render_frame_host) {} | 240 virtual void FrameDetached(RenderFrameHost* render_frame_host) {} |
241 | 241 |
242 // This method is invoked when the renderer has completed its first paint | 242 // This method is invoked when the renderer has completed its first paint |
243 // after a non-empty layout. | 243 // after a non-empty layout. |
244 virtual void DidFirstVisuallyNonEmptyPaint() {} | 244 virtual void DidFirstVisuallyNonEmptyPaint() {} |
245 | 245 |
246 // These two methods correspond to the points in time when the spinner of the | 246 // These two methods correspond to the points in time when the spinner of the |
247 // tab starts and stops spinning. | 247 // tab starts and stops spinning. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 void ResetWebContents(); | 367 void ResetWebContents(); |
368 | 368 |
369 WebContentsImpl* web_contents_; | 369 WebContentsImpl* web_contents_; |
370 | 370 |
371 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 371 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
372 }; | 372 }; |
373 | 373 |
374 } // namespace content | 374 } // namespace content |
375 | 375 |
376 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 376 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |