OLD | NEW |
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_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IM
PL_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IM
PL_H_ |
6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IM
PL_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE_IM
PL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/dom_distiller/content/browser/distiller_ui_handle.h" | 9 #include "components/dom_distiller/content/browser/distiller_ui_handle.h" |
10 #include "components/dom_distiller/content/common/distiller_javascript_service.m
ojom.h" | 10 #include "components/dom_distiller/content/common/distiller_javascript_service.m
ojom.h" |
11 #include "mojo/public/cpp/bindings/strong_binding.h" | 11 #include "mojo/public/cpp/bindings/strong_binding.h" |
12 #include "services/service_manager/public/cpp/bind_source_info.h" | 12 #include "services/service_manager/public/cpp/bind_source_info.h" |
13 | 13 |
14 namespace dom_distiller { | 14 namespace dom_distiller { |
15 | 15 |
16 // This is the receiving end of "distiller" JavaScript object calls. | 16 // This is the receiving end of "distiller" JavaScript object calls. |
17 class DistillerJavaScriptServiceImpl | 17 class DistillerJavaScriptServiceImpl |
18 : public mojom::DistillerJavaScriptService { | 18 : public mojom::DistillerJavaScriptService { |
19 public: | 19 public: |
20 DistillerJavaScriptServiceImpl(content::RenderFrameHost* render_frame_host, | 20 DistillerJavaScriptServiceImpl(content::RenderFrameHost* render_frame_host, |
21 DistillerUIHandle* distiller_ui_handle); | 21 DistillerUIHandle* distiller_ui_handle); |
22 ~DistillerJavaScriptServiceImpl() override; | 22 ~DistillerJavaScriptServiceImpl() override; |
23 | 23 |
24 // Mojo mojom::DistillerJavaScriptService implementation. | 24 // Mojo mojom::DistillerJavaScriptService implementation. |
25 | 25 |
26 // Make a call into Android to close the overlay panel containing reader mode. | |
27 void HandleDistillerClosePanelCall(bool animate) override; | |
28 | |
29 // Show the Android view containing Reader Mode settings. | 26 // Show the Android view containing Reader Mode settings. |
30 void HandleDistillerOpenSettingsCall() override; | 27 void HandleDistillerOpenSettingsCall() override; |
31 | 28 |
32 private: | 29 private: |
33 content::RenderFrameHost* render_frame_host_; | 30 content::RenderFrameHost* render_frame_host_; |
34 DistillerUIHandle* distiller_ui_handle_; | 31 DistillerUIHandle* distiller_ui_handle_; |
35 | 32 |
36 DISALLOW_COPY_AND_ASSIGN(DistillerJavaScriptServiceImpl); | 33 DISALLOW_COPY_AND_ASSIGN(DistillerJavaScriptServiceImpl); |
37 }; | 34 }; |
38 | 35 |
39 // static | 36 // static |
40 void CreateDistillerJavaScriptService( | 37 void CreateDistillerJavaScriptService( |
41 content::RenderFrameHost* render_frame_host, | 38 content::RenderFrameHost* render_frame_host, |
42 DistillerUIHandle* distiller_ui_handle, | 39 DistillerUIHandle* distiller_ui_handle, |
43 const service_manager::BindSourceInfo& source_info, | 40 const service_manager::BindSourceInfo& source_info, |
44 mojom::DistillerJavaScriptServiceRequest request); | 41 mojom::DistillerJavaScriptServiceRequest request); |
45 | 42 |
46 } // namespace dom_distiller | 43 } // namespace dom_distiller |
47 | 44 |
48 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE
_IMPL_H_ | 45 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLER_JAVASCRIPT_SERVICE
_IMPL_H_ |
OLD | NEW |