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/certificate_request_result_type.h" | |
15 #include "content/public/browser/navigation_controller.h" | 16 #include "content/public/browser/navigation_controller.h" |
16 #include "content/public/browser/reload_type.h" | 17 #include "content/public/browser/reload_type.h" |
18 #include "content/public/browser/web_contents.h" | |
17 #include "content/public/common/frame_navigate_params.h" | 19 #include "content/public/common/frame_navigate_params.h" |
18 #include "content/public/common/resource_type.h" | 20 #include "content/public/common/resource_type.h" |
19 #include "ipc/ipc_listener.h" | 21 #include "ipc/ipc_listener.h" |
20 #include "ipc/ipc_sender.h" | 22 #include "ipc/ipc_sender.h" |
21 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 23 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
22 #include "third_party/skia/include/core/SkColor.h" | 24 #include "third_party/skia/include/core/SkColor.h" |
23 #include "ui/base/page_transition_types.h" | 25 #include "ui/base/page_transition_types.h" |
24 #include "ui/base/window_open_disposition.h" | 26 #include "ui/base/window_open_disposition.h" |
25 | 27 |
26 namespace content { | 28 namespace content { |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
291 // cancelled, e.g. window.stop() is invoked. | 293 // cancelled, e.g. window.stop() is invoked. |
292 virtual void DidFailLoad(RenderFrameHost* render_frame_host, | 294 virtual void DidFailLoad(RenderFrameHost* render_frame_host, |
293 const GURL& validated_url, | 295 const GURL& validated_url, |
294 int error_code, | 296 int error_code, |
295 const base::string16& error_description, | 297 const base::string16& error_description, |
296 bool was_ignored_by_handler) {} | 298 bool was_ignored_by_handler) {} |
297 | 299 |
298 // This method is invoked when the visible security state of the page changes. | 300 // This method is invoked when the visible security state of the page changes. |
299 virtual void DidChangeVisibleSecurityState() {} | 301 virtual void DidChangeVisibleSecurityState() {} |
300 | 302 |
303 using CertErrorCallback = WebContents::CertErrorCallback; | |
pfeldman
2017/02/08 18:24:00
The code you change is all within content/, so you
| |
304 // This method is invoked when there is an internal certificate error. | |
305 // Return value indicates that this observer will handle the error. | |
306 virtual bool NotifyCertificateError(CertErrorCallback callback); | |
307 | |
301 // This method is invoked when content was loaded from an in-memory cache. | 308 // This method is invoked when content was loaded from an in-memory cache. |
302 virtual void DidLoadResourceFromMemoryCache( | 309 virtual void DidLoadResourceFromMemoryCache( |
303 const GURL& url, | 310 const GURL& url, |
304 const std::string& mime_type, | 311 const std::string& mime_type, |
305 ResourceType resource_type) {} | 312 ResourceType resource_type) {} |
306 | 313 |
307 // This method is invoked when a response has been received for a resource | 314 // This method is invoked when a response has been received for a resource |
308 // request. | 315 // request. |
309 virtual void DidGetResourceResponseStart( | 316 virtual void DidGetResourceResponseStart( |
310 const ResourceRequestDetails& details) {} | 317 const ResourceRequestDetails& details) {} |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
511 void ResetWebContents(); | 518 void ResetWebContents(); |
512 | 519 |
513 WebContentsImpl* web_contents_; | 520 WebContentsImpl* web_contents_; |
514 | 521 |
515 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 522 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
516 }; | 523 }; |
517 | 524 |
518 } // namespace content | 525 } // namespace content |
519 | 526 |
520 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 527 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |