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_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/process/kill.h" | 15 #include "base/process/kill.h" |
16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
17 #include "base/supports_user_data.h" | 17 #include "base/supports_user_data.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
20 #include "content/public/browser/certificate_request_result_type.h" | |
20 #include "content/public/browser/invalidate_type.h" | 21 #include "content/public/browser/invalidate_type.h" |
21 #include "content/public/browser/navigation_controller.h" | 22 #include "content/public/browser/navigation_controller.h" |
22 #include "content/public/browser/page_navigator.h" | 23 #include "content/public/browser/page_navigator.h" |
23 #include "content/public/browser/save_page_type.h" | 24 #include "content/public/browser/save_page_type.h" |
24 #include "content/public/browser/site_instance.h" | 25 #include "content/public/browser/site_instance.h" |
25 #include "content/public/browser/web_ui.h" | 26 #include "content/public/browser/web_ui.h" |
26 #include "content/public/common/stop_find_action.h" | 27 #include "content/public/common/stop_find_action.h" |
27 #include "ipc/ipc_sender.h" | 28 #include "ipc/ipc_sender.h" |
28 #include "third_party/skia/include/core/SkColor.h" | 29 #include "third_party/skia/include/core/SkColor.h" |
29 #include "ui/base/window_open_disposition.h" | 30 #include "ui/base/window_open_disposition.h" |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
425 | 426 |
426 // Attaches this inner WebContents to its container frame | 427 // Attaches this inner WebContents to its container frame |
427 // |outer_contents_frame| in |outer_web_contents|. | 428 // |outer_contents_frame| in |outer_web_contents|. |
428 virtual void AttachToOuterWebContentsFrame( | 429 virtual void AttachToOuterWebContentsFrame( |
429 WebContents* outer_web_contents, | 430 WebContents* outer_web_contents, |
430 RenderFrameHost* outer_contents_frame) = 0; | 431 RenderFrameHost* outer_contents_frame) = 0; |
431 | 432 |
432 // Invoked when visible security state changes. | 433 // Invoked when visible security state changes. |
433 virtual void DidChangeVisibleSecurityState() = 0; | 434 virtual void DidChangeVisibleSecurityState() = 0; |
434 | 435 |
436 using CertErrorHandler = | |
Eric Seckler
2017/01/19 11:42:28
nit: maybe CertErrorCallback is more descriptive o
irisu
2017/02/07 23:30:19
Done.
| |
437 base::Callback<void(content::CertificateRequestResultType)>; | |
438 // Invoked when a certificate error occurs. | |
Eric Seckler
2017/01/19 11:42:28
nit: mention in comment that this is to give obser
irisu
2017/02/07 23:30:19
Done.
| |
439 virtual bool NotifyCertificateError(CertErrorHandler handler); | |
Eric Seckler
2017/01/19 11:42:28
nit: how about making this pure-virtual, i.e.
virt
irisu
2017/02/07 23:30:19
Done.
| |
440 | |
435 // Commands ------------------------------------------------------------------ | 441 // Commands ------------------------------------------------------------------ |
436 | 442 |
437 // Stop any pending navigation. | 443 // Stop any pending navigation. |
438 virtual void Stop() = 0; | 444 virtual void Stop() = 0; |
439 | 445 |
440 // Creates a new WebContents with the same state as this one. The returned | 446 // Creates a new WebContents with the same state as this one. The returned |
441 // heap-allocated pointer is owned by the caller. | 447 // heap-allocated pointer is owned by the caller. |
442 virtual WebContents* Clone() = 0; | 448 virtual WebContents* Clone() = 0; |
443 | 449 |
444 // Reloads the focused frame. | 450 // Reloads the focused frame. |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
765 | 771 |
766 private: | 772 private: |
767 // This interface should only be implemented inside content. | 773 // This interface should only be implemented inside content. |
768 friend class WebContentsImpl; | 774 friend class WebContentsImpl; |
769 WebContents() {} | 775 WebContents() {} |
770 }; | 776 }; |
771 | 777 |
772 } // namespace content | 778 } // namespace content |
773 | 779 |
774 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 780 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |