| 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/browser/web_contents.h" | |
| 20 #include "content/public/common/media_stream_request.h" | 19 #include "content/public/common/media_stream_request.h" |
| 21 #include "content/public/common/window_container_type.mojom.h" | 20 #include "content/public/common/window_container_type.mojom.h" |
| 22 #include "third_party/WebKit/public/platform/WebDisplayMode.h" | 21 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
| 23 #include "third_party/WebKit/public/platform/WebDragOperation.h" | 22 #include "third_party/WebKit/public/platform/WebDragOperation.h" |
| 24 #include "third_party/WebKit/public/platform/WebSecurityStyle.h" | 23 #include "third_party/WebKit/public/platform/WebSecurityStyle.h" |
| 25 #include "third_party/skia/include/core/SkColor.h" | 24 #include "third_party/skia/include/core/SkColor.h" |
| 26 #include "ui/base/window_open_disposition.h" | 25 #include "ui/base/window_open_disposition.h" |
| 27 #include "ui/gfx/geometry/rect_f.h" | 26 #include "ui/gfx/geometry/rect_f.h" |
| 28 #include "ui/gfx/native_widget_types.h" | 27 #include "ui/gfx/native_widget_types.h" |
| 29 | 28 |
| 30 #if defined(OS_ANDROID) | 29 #if defined(OS_ANDROID) |
| 31 #include "base/android/scoped_java_ref.h" | 30 #include "base/android/scoped_java_ref.h" |
| 32 #endif | 31 #endif |
| 33 | 32 |
| 34 class GURL; | 33 class GURL; |
| 35 | 34 |
| 36 namespace base { | 35 namespace base { |
| 37 class FilePath; | 36 class FilePath; |
| 38 class ListValue; | 37 class ListValue; |
| 39 } | 38 } |
| 40 | 39 |
| 41 namespace content { | 40 namespace content { |
| 42 class ColorChooser; | 41 class ColorChooser; |
| 43 class JavaScriptDialogManager; | 42 class JavaScriptDialogManager; |
| 44 class PageState; | 43 class PageState; |
| 45 class RenderFrameHost; | 44 class RenderFrameHost; |
| 46 class RenderWidgetHost; | 45 class RenderWidgetHost; |
| 47 class SessionStorageNamespace; | 46 class SessionStorageNamespace; |
| 48 class SiteInstance; | 47 class SiteInstance; |
| 48 class WebContents; |
| 49 class WebContentsImpl; | 49 class WebContentsImpl; |
| 50 struct ColorSuggestion; | 50 struct ColorSuggestion; |
| 51 struct ContextMenuParams; | 51 struct ContextMenuParams; |
| 52 struct DropData; | 52 struct DropData; |
| 53 struct FileChooserParams; | 53 struct FileChooserParams; |
| 54 struct NativeWebKeyboardEvent; | 54 struct NativeWebKeyboardEvent; |
| 55 struct Referrer; | 55 struct Referrer; |
| 56 struct SecurityStyleExplanations; | 56 struct SecurityStyleExplanations; |
| 57 } // namespace content | 57 } // namespace content |
| 58 | 58 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 int32_t main_frame_widget_route_id, | 324 int32_t main_frame_widget_route_id, |
| 325 content::mojom::WindowContainerType window_container_type, | 325 content::mojom::WindowContainerType window_container_type, |
| 326 const GURL& opener_url, | 326 const GURL& opener_url, |
| 327 const std::string& frame_name, | 327 const std::string& frame_name, |
| 328 const GURL& target_url, | 328 const GURL& target_url, |
| 329 const std::string& partition_id, | 329 const std::string& partition_id, |
| 330 SessionStorageNamespace* session_storage_namespace); | 330 SessionStorageNamespace* session_storage_namespace); |
| 331 | 331 |
| 332 // Notifies the delegate about the creation of a new WebContents. This | 332 // Notifies the delegate about the creation of a new WebContents. This |
| 333 // typically happens when popups are created. | 333 // typically happens when popups are created. |
| 334 virtual void WebContentsCreated( | 334 virtual void WebContentsCreated(WebContents* source_contents, |
| 335 WebContents* source_contents, | 335 int opener_render_process_id, |
| 336 int opener_render_process_id, | 336 int opener_render_frame_id, |
| 337 int opener_render_frame_id, | 337 const std::string& frame_name, |
| 338 const std::string& frame_name, | 338 const GURL& target_url, |
| 339 const GURL& target_url, | 339 WebContents* new_contents) {} |
| 340 WebContents* new_contents, | |
| 341 const base::Optional<WebContents::CreateParams>& create_params) {} | |
| 342 | 340 |
| 343 // Notification that the tab is hung. | 341 // Notification that the tab is hung. |
| 344 virtual void RendererUnresponsive( | 342 virtual void RendererUnresponsive( |
| 345 WebContents* source, | 343 WebContents* source, |
| 346 const WebContentsUnresponsiveState& unresponsive_state) {} | 344 const WebContentsUnresponsiveState& unresponsive_state) {} |
| 347 | 345 |
| 348 // Notification that the tab is no longer hung. | 346 // Notification that the tab is no longer hung. |
| 349 virtual void RendererResponsive(WebContents* source) {} | 347 virtual void RendererResponsive(WebContents* source) {} |
| 350 | 348 |
| 351 // Invoked when a main fram navigation occurs. | 349 // Invoked when a main fram navigation occurs. |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 // Called when |this| is no longer the WebContentsDelegate for |source|. | 575 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 578 void Detach(WebContents* source); | 576 void Detach(WebContents* source); |
| 579 | 577 |
| 580 // The WebContents that this is currently a delegate for. | 578 // The WebContents that this is currently a delegate for. |
| 581 std::set<WebContents*> attached_contents_; | 579 std::set<WebContents*> attached_contents_; |
| 582 }; | 580 }; |
| 583 | 581 |
| 584 } // namespace content | 582 } // namespace content |
| 585 | 583 |
| 586 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 584 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |