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

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

Issue 1458703003: Media Session API: use MediaMetadata in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_session_browser_side
Patch Set: nits Created 4 years, 9 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
« no previous file with comments | « content/public/android/java/src/org/chromium/content_public/common/MediaMetadata.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/process/kill.h" 11 #include "base/process/kill.h"
12 #include "base/process/process_handle.h" 12 #include "base/process/process_handle.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/public/browser/navigation_controller.h" 14 #include "content/public/browser/navigation_controller.h"
15 #include "content/public/common/frame_navigate_params.h" 15 #include "content/public/common/frame_navigate_params.h"
16 #include "content/public/common/media_metadata.h"
16 #include "content/public/common/security_style.h" 17 #include "content/public/common/security_style.h"
17 #include "ipc/ipc_listener.h" 18 #include "ipc/ipc_listener.h"
18 #include "ipc/ipc_sender.h" 19 #include "ipc/ipc_sender.h"
19 #include "third_party/WebKit/public/web/WebInputEvent.h" 20 #include "third_party/WebKit/public/web/WebInputEvent.h"
20 #include "third_party/skia/include/core/SkColor.h" 21 #include "third_party/skia/include/core/SkColor.h"
21 #include "ui/base/page_transition_types.h" 22 #include "ui/base/page_transition_types.h"
22 #include "ui/base/window_open_disposition.h" 23 #include "ui/base/window_open_disposition.h"
23 24
24 namespace content { 25 namespace content {
25 26
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 // RenderFrameHost. There may be multiple players within a RenderFrameHost 439 // RenderFrameHost. There may be multiple players within a RenderFrameHost
439 // and subsequently within a WebContents. MediaStartedPlaying() will always 440 // and subsequently within a WebContents. MediaStartedPlaying() will always
440 // be followed by MediaStoppedPlaying() after player teardown. Observers must 441 // be followed by MediaStoppedPlaying() after player teardown. Observers must
441 // release all stored copies of |id| when MediaStoppedPlaying() is received. 442 // release all stored copies of |id| when MediaStoppedPlaying() is received.
442 using MediaPlayerId = std::pair<RenderFrameHost*, int>; 443 using MediaPlayerId = std::pair<RenderFrameHost*, int>;
443 virtual void MediaStartedPlaying(const MediaPlayerId& id) {} 444 virtual void MediaStartedPlaying(const MediaPlayerId& id) {}
444 virtual void MediaStoppedPlaying(const MediaPlayerId& id) {} 445 virtual void MediaStoppedPlaying(const MediaPlayerId& id) {}
445 446
446 // Invoked when media session has changed its state. 447 // Invoked when media session has changed its state.
447 virtual void MediaSessionStateChanged(bool is_controllable, 448 virtual void MediaSessionStateChanged(bool is_controllable,
448 bool is_suspended) {} 449 bool is_suspended,
450 const MediaMetadata& metadata) {}
449 451
450 // Invoked when the renderer process changes the page scale factor. 452 // Invoked when the renderer process changes the page scale factor.
451 virtual void OnPageScaleFactorChanged(float page_scale_factor) {} 453 virtual void OnPageScaleFactorChanged(float page_scale_factor) {}
452 454
453 // Invoked if an IPC message is coming from a specific RenderFrameHost. 455 // Invoked if an IPC message is coming from a specific RenderFrameHost.
454 virtual bool OnMessageReceived(const IPC::Message& message, 456 virtual bool OnMessageReceived(const IPC::Message& message,
455 RenderFrameHost* render_frame_host); 457 RenderFrameHost* render_frame_host);
456 458
457 // Notification that |contents| has gained focus. 459 // Notification that |contents| has gained focus.
458 virtual void OnWebContentsFocused() {} 460 virtual void OnWebContentsFocused() {}
(...skipping 28 matching lines...) Expand all
487 void ResetWebContents(); 489 void ResetWebContents();
488 490
489 WebContentsImpl* web_contents_; 491 WebContentsImpl* web_contents_;
490 492
491 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 493 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
492 }; 494 };
493 495
494 } // namespace content 496 } // namespace content
495 497
496 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 498 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content_public/common/MediaMetadata.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698