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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/optional.h" | 11 #include "base/optional.h" |
12 #include "base/process/kill.h" | 12 #include "base/process/kill.h" |
13 #include "base/process/process_handle.h" | 13 #include "base/process/process_handle.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "content/public/browser/navigation_controller.h" | 15 #include "content/public/browser/navigation_controller.h" |
| 16 #include "content/public/browser/reload_type.h" |
16 #include "content/public/common/frame_navigate_params.h" | 17 #include "content/public/common/frame_navigate_params.h" |
17 #include "content/public/common/resource_type.h" | 18 #include "content/public/common/resource_type.h" |
18 #include "content/public/common/security_style.h" | 19 #include "content/public/common/security_style.h" |
19 #include "ipc/ipc_listener.h" | 20 #include "ipc/ipc_listener.h" |
20 #include "ipc/ipc_sender.h" | 21 #include "ipc/ipc_sender.h" |
21 #include "third_party/WebKit/public/web/WebInputEvent.h" | 22 #include "third_party/WebKit/public/web/WebInputEvent.h" |
22 #include "third_party/skia/include/core/SkColor.h" | 23 #include "third_party/skia/include/core/SkColor.h" |
23 #include "ui/base/page_transition_types.h" | 24 #include "ui/base/page_transition_types.h" |
24 #include "ui/base/window_open_disposition.h" | 25 #include "ui/base/window_open_disposition.h" |
25 | 26 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // This method is invoked after the browser process starts a navigation to a | 188 // This method is invoked after the browser process starts a navigation to a |
188 // pending NavigationEntry. It is not called for renderer-initiated | 189 // pending NavigationEntry. It is not called for renderer-initiated |
189 // navigations unless they are sent to the browser process via OpenURL. It may | 190 // navigations unless they are sent to the browser process via OpenURL. It may |
190 // be called multiple times for a given navigation, such as a typed URL | 191 // be called multiple times for a given navigation, such as a typed URL |
191 // followed by a cross-process client or server redirect. | 192 // followed by a cross-process client or server redirect. |
192 // | 193 // |
193 // SOON TO BE DEPRECATED. Use DidStartNavigation instead in PlzNavigate. In | 194 // SOON TO BE DEPRECATED. Use DidStartNavigation instead in PlzNavigate. In |
194 // default mode, it is still necessary to override this function to be | 195 // default mode, it is still necessary to override this function to be |
195 // notified about a navigation earlier than DidStartProvisionalLoad. This | 196 // notified about a navigation earlier than DidStartProvisionalLoad. This |
196 // function will be removed when PlzNavigate is enabled. | 197 // function will be removed when PlzNavigate is enabled. |
197 virtual void DidStartNavigationToPendingEntry( | 198 virtual void DidStartNavigationToPendingEntry(const GURL& url, |
198 const GURL& url, | 199 ReloadType reload_type) {} |
199 NavigationController::ReloadType reload_type) {} | |
200 | 200 |
201 // |render_frame_host| is the RenderFrameHost for which the provisional load | 201 // |render_frame_host| is the RenderFrameHost for which the provisional load |
202 // is happening. | 202 // is happening. |
203 // | 203 // |
204 // Since the URL validation will strip error URLs, or srcdoc URLs, the boolean | 204 // Since the URL validation will strip error URLs, or srcdoc URLs, the boolean |
205 // flags |is_error_page| and |is_iframe_srcdoc| will indicate that the not | 205 // flags |is_error_page| and |is_iframe_srcdoc| will indicate that the not |
206 // validated URL was either an error page or an iframe srcdoc. | 206 // validated URL was either an error page or an iframe srcdoc. |
207 // | 207 // |
208 // Note that during a cross-process navigation, several provisional loads | 208 // Note that during a cross-process navigation, several provisional loads |
209 // can be on-going in parallel. | 209 // can be on-going in parallel. |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 void ResetWebContents(); | 515 void ResetWebContents(); |
516 | 516 |
517 WebContentsImpl* web_contents_; | 517 WebContentsImpl* web_contents_; |
518 | 518 |
519 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 519 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
520 }; | 520 }; |
521 | 521 |
522 } // namespace content | 522 } // namespace content |
523 | 523 |
524 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 524 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |