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

Side by Side Diff: content/browser/media/media_web_contents_observer.h

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_
6 #define CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ 6 #define CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 22 matching lines...) Expand all
33 void MaybeUpdateAudibleState(bool recently_audible); 33 void MaybeUpdateAudibleState(bool recently_audible);
34 34
35 // WebContentsObserver implementation. 35 // WebContentsObserver implementation.
36 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; 36 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
37 bool OnMessageReceived(const IPC::Message& message, 37 bool OnMessageReceived(const IPC::Message& message,
38 RenderFrameHost* render_frame_host) override; 38 RenderFrameHost* render_frame_host) override;
39 void WasShown() override; 39 void WasShown() override;
40 void WasHidden() override; 40 void WasHidden() override;
41 41
42 bool has_audio_power_save_blocker_for_testing() const { 42 bool has_audio_power_save_blocker_for_testing() const {
43 return audio_power_save_blocker_; 43 return !!audio_power_save_blocker_;
44 } 44 }
45 45
46 bool has_video_power_save_blocker_for_testing() const { 46 bool has_video_power_save_blocker_for_testing() const {
47 return video_power_save_blocker_; 47 return !!video_power_save_blocker_;
48 } 48 }
49 49
50 private: 50 private:
51 void OnMediaPlayingNotification(RenderFrameHost* render_frame_host, 51 void OnMediaPlayingNotification(RenderFrameHost* render_frame_host,
52 int64_t player_cookie, 52 int64_t player_cookie,
53 bool has_video, 53 bool has_video,
54 bool has_audio, 54 bool has_audio,
55 bool is_remote); 55 bool is_remote);
56 void OnMediaPausedNotification(RenderFrameHost* render_frame_host, 56 void OnMediaPausedNotification(RenderFrameHost* render_frame_host,
57 int64_t player_cookie); 57 int64_t player_cookie);
(...skipping 29 matching lines...) Expand all
87 ActiveMediaPlayerMap active_video_players_; 87 ActiveMediaPlayerMap active_video_players_;
88 scoped_ptr<PowerSaveBlocker> audio_power_save_blocker_; 88 scoped_ptr<PowerSaveBlocker> audio_power_save_blocker_;
89 scoped_ptr<PowerSaveBlocker> video_power_save_blocker_; 89 scoped_ptr<PowerSaveBlocker> video_power_save_blocker_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver); 91 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver);
92 }; 92 };
93 93
94 } // namespace content 94 } // namespace content
95 95
96 #endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ 96 #endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698