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_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 17 #include "content/public/browser/bluetooth_chooser.h" | 17 #include "content/public/browser/bluetooth_chooser.h" |
| 18 #include "content/public/browser/invalidate_type.h" | 18 #include "content/public/browser/invalidate_type.h" |
| 19 #include "content/public/common/media_stream_request.h" | 19 #include "content/public/common/media_stream_request.h" |
| 20 #include "content/public/common/security_style.h" | 20 #include "content/public/common/security_style.h" |
| 21 #include "content/public/common/window_container_type.h" | 21 #include "content/public/common/window_container_type.h" |
| 22 #include "third_party/WebKit/public/platform/WebDisplayMode.h" | 22 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
| 23 #include "third_party/WebKit/public/platform/WebDragOperation.h" | 23 #include "third_party/WebKit/public/platform/WebDragOperation.h" |
| 24 #include "third_party/skia/include/core/SkColor.h" | 24 #include "third_party/skia/include/core/SkColor.h" |
| 25 #include "ui/base/ime/text_input_type.h" | |
| 25 #include "ui/base/window_open_disposition.h" | 26 #include "ui/base/window_open_disposition.h" |
| 26 #include "ui/gfx/geometry/rect_f.h" | 27 #include "ui/gfx/geometry/rect_f.h" |
| 27 #include "ui/gfx/native_widget_types.h" | 28 #include "ui/gfx/native_widget_types.h" |
| 28 | 29 |
| 29 class GURL; | 30 class GURL; |
| 30 | 31 |
| 31 namespace base { | 32 namespace base { |
| 32 class FilePath; | 33 class FilePath; |
| 33 class ListValue; | 34 class ListValue; |
| 34 } | 35 } |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 522 virtual void ShowCertificateViewerInDevTools( | 523 virtual void ShowCertificateViewerInDevTools( |
| 523 WebContents* web_contents, | 524 WebContents* web_contents, |
| 524 scoped_refptr<net::X509Certificate> certificate); | 525 scoped_refptr<net::X509Certificate> certificate); |
| 525 | 526 |
| 526 // Called when the active render widget is forwarding a RemoteChannel | 527 // Called when the active render widget is forwarding a RemoteChannel |
| 527 // compositor proto. This is used in Blimp mode. | 528 // compositor proto. This is used in Blimp mode. |
| 528 virtual void ForwardCompositorProto( | 529 virtual void ForwardCompositorProto( |
| 529 RenderWidgetHost* render_widget_host, | 530 RenderWidgetHost* render_widget_host, |
| 530 const std::vector<uint8_t>& proto) {} | 531 const std::vector<uint8_t>& proto) {} |
| 531 | 532 |
| 533 virtual void OnUpdateTextInputState( | |
|
Charlie Reis
2016/10/05 21:19:33
All public methods here should have comments.
Als
| |
| 534 content::RenderWidgetHost* render_widget_host, | |
| 535 ui::TextInputType type, | |
| 536 const std::string& text, | |
| 537 const std::string& placeholder, | |
| 538 bool show_ime_if_needed) {} | |
| 539 | |
| 532 // Requests the app banner. This method is called from the DevTools. | 540 // Requests the app banner. This method is called from the DevTools. |
| 533 virtual void RequestAppBannerFromDevTools(content::WebContents* web_contents); | 541 virtual void RequestAppBannerFromDevTools(content::WebContents* web_contents); |
| 534 | 542 |
| 535 protected: | 543 protected: |
| 536 virtual ~WebContentsDelegate(); | 544 virtual ~WebContentsDelegate(); |
| 537 | 545 |
| 538 private: | 546 private: |
| 539 friend class WebContentsImpl; | 547 friend class WebContentsImpl; |
| 540 | 548 |
| 541 // Called when |this| becomes the WebContentsDelegate for |source|. | 549 // Called when |this| becomes the WebContentsDelegate for |source|. |
| 542 void Attach(WebContents* source); | 550 void Attach(WebContents* source); |
| 543 | 551 |
| 544 // Called when |this| is no longer the WebContentsDelegate for |source|. | 552 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 545 void Detach(WebContents* source); | 553 void Detach(WebContents* source); |
| 546 | 554 |
| 547 // The WebContents that this is currently a delegate for. | 555 // The WebContents that this is currently a delegate for. |
| 548 std::set<WebContents*> attached_contents_; | 556 std::set<WebContents*> attached_contents_; |
| 549 }; | 557 }; |
| 550 | 558 |
| 551 } // namespace content | 559 } // namespace content |
| 552 | 560 |
| 553 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 561 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |