| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/browser/invalidate_type.h" | 15 #include "content/public/browser/invalidate_type.h" |
| 16 #include "content/public/browser/navigation_type.h" | 16 #include "content/public/browser/navigation_type.h" |
| 17 #include "content/public/common/media_stream_request.h" | 17 #include "content/public/common/media_stream_request.h" |
| 18 #include "content/public/common/window_container_type.h" | 18 #include "content/public/common/window_container_type.h" |
| 19 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
| 19 #include "third_party/WebKit/public/web/WebDragOperation.h" | 20 #include "third_party/WebKit/public/web/WebDragOperation.h" |
| 20 #include "third_party/skia/include/core/SkColor.h" | 21 #include "third_party/skia/include/core/SkColor.h" |
| 21 #include "ui/base/window_open_disposition.h" | 22 #include "ui/base/window_open_disposition.h" |
| 22 #include "ui/gfx/geometry/rect_f.h" | 23 #include "ui/gfx/geometry/rect_f.h" |
| 23 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
| 24 | 25 |
| 25 class GURL; | 26 class GURL; |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 class FilePath; | 29 class FilePath; |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 // URL's origin should be used. | 351 // URL's origin should be used. |
| 351 virtual void EnterFullscreenModeForTab(WebContents* web_contents, | 352 virtual void EnterFullscreenModeForTab(WebContents* web_contents, |
| 352 const GURL& origin) {} | 353 const GURL& origin) {} |
| 353 | 354 |
| 354 // Called when the renderer puts a tab out of fullscreen mode. | 355 // Called when the renderer puts a tab out of fullscreen mode. |
| 355 virtual void ExitFullscreenModeForTab(WebContents*) {} | 356 virtual void ExitFullscreenModeForTab(WebContents*) {} |
| 356 | 357 |
| 357 virtual bool IsFullscreenForTabOrPending( | 358 virtual bool IsFullscreenForTabOrPending( |
| 358 const WebContents* web_contents) const; | 359 const WebContents* web_contents) const; |
| 359 | 360 |
| 361 // Returns the actual display mode of the top-level browsing context. |
| 362 // For example, it should return 'blink::WebDisplayModeFullscreen' whenever |
| 363 // the browser window is put to fullscreen mode (either by the end user, |
| 364 // or HTML API or from a web manifest setting). |
| 365 // See http://w3c.github.io/manifest/#dfn-display-mode |
| 366 virtual blink::WebDisplayMode GetDisplayMode( |
| 367 const WebContents* web_contents) const; |
| 368 |
| 360 // Register a new handler for URL requests with the given scheme. | 369 // Register a new handler for URL requests with the given scheme. |
| 361 // |user_gesture| is true if the registration is made in the context of a user | 370 // |user_gesture| is true if the registration is made in the context of a user |
| 362 // gesture. | 371 // gesture. |
| 363 virtual void RegisterProtocolHandler(WebContents* web_contents, | 372 virtual void RegisterProtocolHandler(WebContents* web_contents, |
| 364 const std::string& protocol, | 373 const std::string& protocol, |
| 365 const GURL& url, | 374 const GURL& url, |
| 366 bool user_gesture) {} | 375 bool user_gesture) {} |
| 367 | 376 |
| 368 // Unregister the registered handler for URL requests with the given scheme. | 377 // Unregister the registered handler for URL requests with the given scheme. |
| 369 // |user_gesture| is true if the registration is made in the context of a user | 378 // |user_gesture| is true if the registration is made in the context of a user |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 // Called when |this| is no longer the WebContentsDelegate for |source|. | 493 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 485 void Detach(WebContents* source); | 494 void Detach(WebContents* source); |
| 486 | 495 |
| 487 // The WebContents that this is currently a delegate for. | 496 // The WebContents that this is currently a delegate for. |
| 488 std::set<WebContents*> attached_contents_; | 497 std::set<WebContents*> attached_contents_; |
| 489 }; | 498 }; |
| 490 | 499 |
| 491 } // namespace content | 500 } // namespace content |
| 492 | 501 |
| 493 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 502 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |