| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_CONTEXTUAL_SEARCH_OVERLAY_PAGE_NOTIFIER_SERVICE_IMPL_H_ |
| 6 #define COMPONENTS_CONTEXTUAL_SEARCH_OVERLAY_PAGE_NOTIFIER_SERVICE_IMPL_H_ |
| 7 |
| 8 #include "components/contextual_search/overlay_js_render_frame_observer.h" |
| 9 #include "components/contextual_search/overlay_page_notifier_service.mojom.h" |
| 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 11 |
| 12 namespace contextual_search { |
| 13 |
| 14 class OverlayJsRenderFrameObserver; |
| 15 |
| 16 // OverlayPageNotifierService is responsible for listening to the browser for |
| 17 // messages about whether a page is presented in an overlay panel. |
| 18 // No message is received if the page is not presented in an overlay panel. |
| 19 // This service should be removed from the registry once the page is done |
| 20 // loading. |
| 21 class OverlayPageNotifierServiceImpl : public OverlayPageNotifierService { |
| 22 public: |
| 23 explicit OverlayPageNotifierServiceImpl( |
| 24 OverlayJsRenderFrameObserver* observer, |
| 25 mojo::InterfaceRequest<OverlayPageNotifierService> request); |
| 26 ~OverlayPageNotifierServiceImpl() override; |
| 27 |
| 28 // Implementation of mojo interface OverlayPageNotifierService. |
| 29 void NotifyIsContextualSearchOverlay() override; |
| 30 |
| 31 private: |
| 32 mojo::StrongBinding<OverlayPageNotifierService> binding_; |
| 33 OverlayJsRenderFrameObserver* overlay_js_observer_; |
| 34 }; |
| 35 |
| 36 } // namespace contextual_search |
| 37 |
| 38 #endif // COMPONENTS_CONTEXTUAL_SEARCH_OVERLAY_PAGE_NOTIFIER_SERVICE_IMPL_H_ |
| OLD | NEW |