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

Side by Side Diff: components/contextual_search/overlay_page_notifier_service_impl.h

Issue 1385663002: [Contextual Search] Add Mojo-enabled API component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reworked to use a new Contextual Search component and Mojo communication, removed CS Manager stuff. Created 5 years, 1 month 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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698