Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: content/public/browser/web_contents_observer.h

Issue 1570043002: Implement MediaSession on top of the WebMediaPlayerDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_session
Patch Set: Reorder. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 const std::vector<AXEventNotificationDetails>& details) {} 428 const std::vector<AXEventNotificationDetails>& details) {}
429 429
430 // Invoked when theme color is changed to |theme_color|. 430 // Invoked when theme color is changed to |theme_color|.
431 virtual void DidChangeThemeColor(SkColor theme_color) {} 431 virtual void DidChangeThemeColor(SkColor theme_color) {}
432 432
433 // Invoked when media is playing or paused. |id| is unique per player and per 433 // Invoked when media is playing or paused. |id| is unique per player and per
434 // RenderFrameHost. There may be multiple players within a RenderFrameHost 434 // RenderFrameHost. There may be multiple players within a RenderFrameHost
435 // and subsequently within a WebContents. MediaStartedPlaying() will always 435 // and subsequently within a WebContents. MediaStartedPlaying() will always
436 // be followed by MediaStoppedPlaying() after player teardown. Observers must 436 // be followed by MediaStoppedPlaying() after player teardown. Observers must
437 // release all stored copies of |id| when MediaStoppedPlaying() is received. 437 // release all stored copies of |id| when MediaStoppedPlaying() is received.
438 using MediaPlayerId = std::pair<RenderFrameHost*, int64_t>; 438 using MediaPlayerId = std::pair<RenderFrameHost*, int>;
439 virtual void MediaStartedPlaying(const MediaPlayerId& id) {} 439 virtual void MediaStartedPlaying(const MediaPlayerId& id) {}
440 virtual void MediaStoppedPlaying(const MediaPlayerId& id) {} 440 virtual void MediaStoppedPlaying(const MediaPlayerId& id) {}
441 441
442 // Invoked when media session has changed its state. 442 // Invoked when media session has changed its state.
443 virtual void MediaSessionStateChanged(bool is_controllable, 443 virtual void MediaSessionStateChanged(bool is_controllable,
444 bool is_suspended) {} 444 bool is_suspended) {}
445 445
446 // Invoked when the renderer process changes the page scale factor. 446 // Invoked when the renderer process changes the page scale factor.
447 virtual void OnPageScaleFactorChanged(float page_scale_factor) {} 447 virtual void OnPageScaleFactorChanged(float page_scale_factor) {}
448 448
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 void ResetWebContents(); 483 void ResetWebContents();
484 484
485 WebContentsImpl* web_contents_; 485 WebContentsImpl* web_contents_;
486 486
487 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 487 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
488 }; 488 };
489 489
490 } // namespace content 490 } // namespace content
491 491
492 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 492 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698