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

Side by Side Diff: chromecast/renderer/cast_media_load_deferrer.h

Issue 2034153002: Makes RenderFrameObserver/RenderViewObserver::OnDestruct pure virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 6 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 CHROMECAST_RENDERER_CAST_MEDIA_LOAD_DEFERRER_H_ 5 #ifndef CHROMECAST_RENDERER_CAST_MEDIA_LOAD_DEFERRER_H_
6 #define CHROMECAST_RENDERER_CAST_MEDIA_LOAD_DEFERRER_H_ 6 #define CHROMECAST_RENDERER_CAST_MEDIA_LOAD_DEFERRER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/public/renderer/render_frame_observer.h" 10 #include "content/public/renderer/render_frame_observer.h"
11 11
12 namespace chromecast { 12 namespace chromecast {
13 13
14 // Defers media player loading in background web apps until brought into 14 // Defers media player loading in background web apps until brought into
15 // foreground. 15 // foreground.
16 class CastMediaLoadDeferrer : public content::RenderFrameObserver { 16 class CastMediaLoadDeferrer : public content::RenderFrameObserver {
17 public: 17 public:
18 // Will run |closure| to continue loading the media resource once the page is 18 // Will run |closure| to continue loading the media resource once the page is
19 // swapped in. 19 // swapped in.
20 CastMediaLoadDeferrer(content::RenderFrame* render_frame, 20 CastMediaLoadDeferrer(content::RenderFrame* render_frame,
21 const base::Closure& continue_loading_cb); 21 const base::Closure& continue_loading_cb);
22 ~CastMediaLoadDeferrer() override; 22 ~CastMediaLoadDeferrer() override;
23 23
24 private: 24 private:
25 // content::RenderFrameObserver implementation: 25 // content::RenderFrameObserver implementation:
26 void WasShown() override; 26 void WasShown() override;
27 void OnDestruct() override;
27 28
28 base::Closure continue_loading_cb_; 29 base::Closure continue_loading_cb_;
29 30
30 DISALLOW_COPY_AND_ASSIGN(CastMediaLoadDeferrer); 31 DISALLOW_COPY_AND_ASSIGN(CastMediaLoadDeferrer);
31 }; 32 };
32 33
33 } // namespace chromecast 34 } // namespace chromecast
34 35
35 #endif // CHROMECAST_RENDERER_CAST_MEDIA_LOAD_DEFERRER_H_ 36 #endif // CHROMECAST_RENDERER_CAST_MEDIA_LOAD_DEFERRER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_provider.cc ('k') | chromecast/renderer/cast_media_load_deferrer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698