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

Side by Side Diff: components/contextual_search/renderer/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: Added a few more missing dependencies to the new component's BUILD.gn rules for our renderer sectio… Created 5 years 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_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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698