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

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

Issue 1478643002: Refactor media out of WebContentsImpl to MediaWebContentsObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove cruft. Created 5 years 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 "base/process/kill.h" 8 #include "base/process/kill.h"
9 #include "base/process/process_handle.h" 9 #include "base/process/process_handle.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // Invoked when a user cancels a before unload dialog. 417 // Invoked when a user cancels a before unload dialog.
418 virtual void BeforeUnloadDialogCancelled() {} 418 virtual void BeforeUnloadDialogCancelled() {}
419 419
420 // Invoked when an accessibility event is received from the renderer process. 420 // Invoked when an accessibility event is received from the renderer process.
421 virtual void AccessibilityEventReceived( 421 virtual void AccessibilityEventReceived(
422 const std::vector<AXEventNotificationDetails>& details) {} 422 const std::vector<AXEventNotificationDetails>& details) {}
423 423
424 // Invoked when theme color is changed to |theme_color|. 424 // Invoked when theme color is changed to |theme_color|.
425 virtual void DidChangeThemeColor(SkColor theme_color) {} 425 virtual void DidChangeThemeColor(SkColor theme_color) {}
426 426
427 // Invoked when media is playing. 427 // Invoked when media is playing or paused. |id| is unique per player and per
428 virtual void MediaStartedPlaying() {} 428 // RenderFrameHost. There may be multiple players within a RenderFrameHost
429 429 // and subsequently within a WebContents. MediaStartedPlaying() will always
430 // Invoked when media is paused. 430 // be followed by MediaPaused() after player teardown.
431 virtual void MediaPaused() {} 431 using MediaPlayerId = std::pair<RenderFrameHost*, int64_t>;
432 virtual void MediaStartedPlaying(const MediaPlayerId& id) {}
ncarter (slow) 2015/12/02 17:49:31 If a frame is detached while media is playing, wha
DaleCurtis 2015/12/02 19:55:46 We could use uintptr_t if we want too; I don't thi
ncarter (slow) 2015/12/05 00:43:33 The uintptr_t vs. RFH* distinction wasn't what I w
DaleCurtis 2015/12/05 01:18:02 Sounds like a good idea. It doesn't technically me
433 virtual void MediaPaused(const MediaPlayerId& id) {}
432 434
433 // Invoked when media session has changed its state. 435 // Invoked when media session has changed its state.
434 virtual void MediaSessionStateChanged(bool is_controllable, 436 virtual void MediaSessionStateChanged(bool is_controllable,
435 bool is_suspended) {} 437 bool is_suspended) {}
436 438
437 // Invoked when the renderer process changes the page scale factor. 439 // Invoked when the renderer process changes the page scale factor.
438 virtual void OnPageScaleFactorChanged(float page_scale_factor) {} 440 virtual void OnPageScaleFactorChanged(float page_scale_factor) {}
439 441
440 // Invoked if an IPC message is coming from a specific RenderFrameHost. 442 // Invoked if an IPC message is coming from a specific RenderFrameHost.
441 virtual bool OnMessageReceived(const IPC::Message& message, 443 virtual bool OnMessageReceived(const IPC::Message& message,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 void ResetWebContents(); 476 void ResetWebContents();
475 477
476 WebContentsImpl* web_contents_; 478 WebContentsImpl* web_contents_;
477 479
478 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 480 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
479 }; 481 };
480 482
481 } // namespace content 483 } // namespace content
482 484
483 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 485 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« content/browser/web_contents/web_contents_impl.cc ('K') | « content/content_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698