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

Side by Side Diff: components/dom_distiller/content/renderer/distiller_page_notifier_service_impl.h

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_DOM_DISTILLER_CONTENT_RENDERER_DISTILLER_PAGE_NOTIFIER_SERVIC E_IMPL_H_ 5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_RENDERER_DISTILLER_PAGE_NOTIFIER_SERVIC E_IMPL_H_
6 #define COMPONENTS_DOM_DISTILLER_CONTENT_RENDERER_DISTILLER_PAGE_NOTIFIER_SERVIC E_IMPL_H_ 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_RENDERER_DISTILLER_PAGE_NOTIFIER_SERVIC E_IMPL_H_
7 7
8 #include "components/dom_distiller/content/common/distiller_page_notifier_servic e.mojom.h" 8 #include "components/dom_distiller/content/common/distiller_page_notifier_servic e.mojom.h"
9 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob server.h" 9 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob server.h"
10 #include "components/dom_distiller/content/renderer/distiller_native_javascript. h" 10 #include "components/dom_distiller/content/renderer/distiller_native_javascript. h"
11 #include "mojo/public/cpp/bindings/strong_binding.h"
12 11
13 namespace dom_distiller { 12 namespace dom_distiller {
14 13
15 class DistillerJsRenderFrameObserver; 14 class DistillerJsRenderFrameObserver;
16 15
17 // mojom::DistillerPageNotifierService is responsible for listening to the 16 // mojom::DistillerPageNotifierService is responsible for listening to the
18 // browser for 17 // browser for
19 // messages about if a page is a distiller page. No message is received if the 18 // messages about if a page is a distiller page. No message is received if the
20 // page is not a distiller page. This service should be removed from the 19 // page is not a distiller page. This service should be removed from the
21 // registry once the page is done loading. 20 // registry once the page is done loading.
22 class DistillerPageNotifierServiceImpl 21 class DistillerPageNotifierServiceImpl
23 : public mojom::DistillerPageNotifierService { 22 : public mojom::DistillerPageNotifierService {
24 public: 23 public:
25 explicit DistillerPageNotifierServiceImpl( 24 explicit DistillerPageNotifierServiceImpl(
26 DistillerJsRenderFrameObserver* observer, 25 DistillerJsRenderFrameObserver* observer);
27 mojo::InterfaceRequest<mojom::DistillerPageNotifierService> request);
28 ~DistillerPageNotifierServiceImpl() override; 26 ~DistillerPageNotifierServiceImpl() override;
29 27
30 // Implementation of mojo interface DistillerPageNotifierService. 28 // Implementation of mojo interface DistillerPageNotifierService.
31 void NotifyIsDistillerPage() override; 29 void NotifyIsDistillerPage() override;
32 30
33 private: 31 private:
34 mojo::StrongBinding<mojom::DistillerPageNotifierService> binding_;
35 DistillerJsRenderFrameObserver* distiller_js_observer_; 32 DistillerJsRenderFrameObserver* distiller_js_observer_;
36 }; 33 };
37 34
38 } // namespace dom_distiller 35 } // namespace dom_distiller
39 36
40 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_RENDERER_DISTILLER_PAGE_NOTIFIER_SER VICE_IMPL_H_ 37 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_RENDERER_DISTILLER_PAGE_NOTIFIER_SER VICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698