| 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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <functional> | 10 #include <functional> |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; | 424 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; |
| 425 virtual WebContentsAndroid* GetWebContentsAndroid(); | 425 virtual WebContentsAndroid* GetWebContentsAndroid(); |
| 426 void ActivateNearestFindResult(float x, float y) override; | 426 void ActivateNearestFindResult(float x, float y) override; |
| 427 void RequestFindMatchRects(int current_version) override; | 427 void RequestFindMatchRects(int current_version) override; |
| 428 service_manager::InterfaceProvider* GetJavaInterfaces() override; | 428 service_manager::InterfaceProvider* GetJavaInterfaces() override; |
| 429 #elif defined(OS_MACOSX) | 429 #elif defined(OS_MACOSX) |
| 430 void SetAllowOtherViews(bool allow) override; | 430 void SetAllowOtherViews(bool allow) override; |
| 431 bool GetAllowOtherViews() override; | 431 bool GetAllowOtherViews() override; |
| 432 #endif | 432 #endif |
| 433 | 433 |
| 434 // TODO(zqzhang): Decouple MediaSession messages from WebContents to avoid |
| 435 // plumbing. See https://crbug.com/658678 |
| 436 // |
| 434 // This method is called when the MediaSession state has changed, and will | 437 // This method is called when the MediaSession state has changed, and will |
| 435 // notify the WebContents observers. | 438 // notify the WebContents observers. |
| 436 void OnMediaSessionStateChanged(); | 439 void OnMediaSessionStateChanged(); |
| 437 // This method is called when the MediaSession metadata has changed, and will | 440 // This method is called when the MediaSession metadata has changed, and will |
| 438 // notify the WebContents observers. | 441 // notify the WebContents observers. |
| 439 void OnMediaSessionMetadataChanged(); | 442 void OnMediaSessionMetadataChanged(); |
| 443 // This method is called when the MediaSession has enabled an action, and will |
| 444 // notify the WebContentsObservers. |
| 445 void OnMediaSessionEnabledAction(blink::mojom::MediaSessionAction action); |
| 446 // This method is called when the MediaSession has disabled an action, and |
| 447 // will |
| 448 // notify the WebContentsObservers. |
| 449 void OnMediaSessionDisabledAction(blink::mojom::MediaSessionAction action); |
| 450 // Tell the media session a user action has performed. |
| 451 void DidReceiveMediaSessionAction( |
| 452 blink::mojom::MediaSessionAction action); |
| 440 | 453 |
| 441 // Implementation of PageNavigator. | 454 // Implementation of PageNavigator. |
| 442 WebContents* OpenURL(const OpenURLParams& params) override; | 455 WebContents* OpenURL(const OpenURLParams& params) override; |
| 443 | 456 |
| 444 // Implementation of IPC::Sender. | 457 // Implementation of IPC::Sender. |
| 445 bool Send(IPC::Message* message) override; | 458 bool Send(IPC::Message* message) override; |
| 446 | 459 |
| 447 // RenderFrameHostDelegate --------------------------------------------------- | 460 // RenderFrameHostDelegate --------------------------------------------------- |
| 448 bool OnMessageReceived(RenderFrameHost* render_frame_host, | 461 bool OnMessageReceived(RenderFrameHost* render_frame_host, |
| 449 const IPC::Message& message) override; | 462 const IPC::Message& message) override; |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1459 // Adds/removes a callback called on creation of each new WebContents. | 1472 // Adds/removes a callback called on creation of each new WebContents. |
| 1460 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1473 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1461 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1474 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1462 | 1475 |
| 1463 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1476 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
| 1464 }; | 1477 }; |
| 1465 | 1478 |
| 1466 } // namespace content | 1479 } // namespace content |
| 1467 | 1480 |
| 1468 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1481 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |