Chromium Code Reviews| 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" |
| 17 #include "content/public/common/frame_navigate_params.h" | 18 #include "content/public/common/frame_navigate_params.h" |
| 18 #include "content/public/common/resource_type.h" | 19 #include "content/public/common/resource_type.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/platform/WebInputEvent.h" | 22 #include "third_party/WebKit/public/platform/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" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 291 // cancelled, e.g. window.stop() is invoked. | 292 // cancelled, e.g. window.stop() is invoked. |
| 292 virtual void DidFailLoad(RenderFrameHost* render_frame_host, | 293 virtual void DidFailLoad(RenderFrameHost* render_frame_host, |
| 293 const GURL& validated_url, | 294 const GURL& validated_url, |
| 294 int error_code, | 295 int error_code, |
| 295 const base::string16& error_description, | 296 const base::string16& error_description, |
| 296 bool was_ignored_by_handler) {} | 297 bool was_ignored_by_handler) {} |
| 297 | 298 |
| 298 // This method is invoked when the visible security state of the page changes. | 299 // This method is invoked when the visible security state of the page changes. |
| 299 virtual void DidChangeVisibleSecurityState() {} | 300 virtual void DidChangeVisibleSecurityState() {} |
| 300 | 301 |
| 302 using CertErrorHandler = | |
|
Eric Seckler
2017/01/19 11:42:28
nit: using CertErrorHandler = WebContents::CertErr
irisu
2017/02/07 23:30:19
Done.
| |
| 303 base::Callback<void(content::CertificateRequestResultType)>; | |
| 304 // This method is invoked when there is an internal certificate error. | |
|
Eric Seckler
2017/01/19 11:42:28
nit: mention what return value indicates :)
irisu
2017/02/07 23:30:19
Done.
| |
| 305 virtual bool NotifyCertificateError(CertErrorHandler callback); | |
| 306 | |
| 301 // This method is invoked when content was loaded from an in-memory cache. | 307 // This method is invoked when content was loaded from an in-memory cache. |
| 302 virtual void DidLoadResourceFromMemoryCache( | 308 virtual void DidLoadResourceFromMemoryCache( |
| 303 const GURL& url, | 309 const GURL& url, |
| 304 const std::string& mime_type, | 310 const std::string& mime_type, |
| 305 ResourceType resource_type) {} | 311 ResourceType resource_type) {} |
| 306 | 312 |
| 307 // This method is invoked when a response has been received for a resource | 313 // This method is invoked when a response has been received for a resource |
| 308 // request. | 314 // request. |
| 309 virtual void DidGetResourceResponseStart( | 315 virtual void DidGetResourceResponseStart( |
| 310 const ResourceRequestDetails& details) {} | 316 const ResourceRequestDetails& details) {} |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 511 void ResetWebContents(); | 517 void ResetWebContents(); |
| 512 | 518 |
| 513 WebContentsImpl* web_contents_; | 519 WebContentsImpl* web_contents_; |
| 514 | 520 |
| 515 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 521 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 516 }; | 522 }; |
| 517 | 523 |
| 518 } // namespace content | 524 } // namespace content |
| 519 | 525 |
| 520 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 526 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |