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