| 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/window_open_disposition.h" | 25 #include "ui/base/window_open_disposition.h" |
| 26 #include "ui/gfx/geometry/rect_f.h" | 26 #include "ui/gfx/geometry/rect_f.h" |
| 27 #include "ui/gfx/native_widget_types.h" | 27 #include "ui/gfx/native_widget_types.h" |
| 28 | 28 |
| 29 #if defined(OS_ANDROID) |
| 30 #include "base/android/scoped_java_ref.h" |
| 31 #endif |
| 32 |
| 29 class GURL; | 33 class GURL; |
| 30 | 34 |
| 31 namespace base { | 35 namespace base { |
| 32 class FilePath; | 36 class FilePath; |
| 33 class ListValue; | 37 class ListValue; |
| 34 } | 38 } |
| 35 | 39 |
| 36 namespace content { | 40 namespace content { |
| 37 class BrowserContext; | 41 class BrowserContext; |
| 38 class ColorChooser; | 42 class ColorChooser; |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 virtual bool CheckMediaAccessPermission(WebContents* web_contents, | 466 virtual bool CheckMediaAccessPermission(WebContents* web_contents, |
| 463 const GURL& security_origin, | 467 const GURL& security_origin, |
| 464 MediaStreamType type); | 468 MediaStreamType type); |
| 465 | 469 |
| 466 #if defined(OS_ANDROID) | 470 #if defined(OS_ANDROID) |
| 467 // Asks permission to decode media stream. After permission is determined, | 471 // Asks permission to decode media stream. After permission is determined, |
| 468 // |callback| will be called with the result. | 472 // |callback| will be called with the result. |
| 469 virtual void RequestMediaDecodePermission( | 473 virtual void RequestMediaDecodePermission( |
| 470 WebContents* web_contents, | 474 WebContents* web_contents, |
| 471 const base::Callback<void(bool)>& callback); | 475 const base::Callback<void(bool)>& callback); |
| 476 |
| 477 // Creates a view embedding the video view. |
| 478 virtual base::android::ScopedJavaLocalRef<jobject> |
| 479 GetContentVideoViewEmbedder(); |
| 480 |
| 481 // Returns true if the given media should be blocked to load. |
| 482 virtual bool ShouldBlockMediaRequest(const GURL& url); |
| 472 #endif | 483 #endif |
| 473 | 484 |
| 474 // Requests permission to access the PPAPI broker. The delegate should return | 485 // Requests permission to access the PPAPI broker. The delegate should return |
| 475 // true and call the passed in |callback| with the result, or return false | 486 // true and call the passed in |callback| with the result, or return false |
| 476 // to indicate that it does not support asking for permission. | 487 // to indicate that it does not support asking for permission. |
| 477 virtual bool RequestPpapiBrokerPermission( | 488 virtual bool RequestPpapiBrokerPermission( |
| 478 WebContents* web_contents, | 489 WebContents* web_contents, |
| 479 const GURL& url, | 490 const GURL& url, |
| 480 const base::FilePath& plugin_path, | 491 const base::FilePath& plugin_path, |
| 481 const base::Callback<void(bool)>& callback); | 492 const base::Callback<void(bool)>& callback); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 // Called when |this| is no longer the WebContentsDelegate for |source|. | 555 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 545 void Detach(WebContents* source); | 556 void Detach(WebContents* source); |
| 546 | 557 |
| 547 // The WebContents that this is currently a delegate for. | 558 // The WebContents that this is currently a delegate for. |
| 548 std::set<WebContents*> attached_contents_; | 559 std::set<WebContents*> attached_contents_; |
| 549 }; | 560 }; |
| 550 | 561 |
| 551 } // namespace content | 562 } // namespace content |
| 552 | 563 |
| 553 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 564 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |