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 #include "components/contextual_search/renderer/overlay_page_notifier_service_im
pl.h" | 5 #include "components/contextual_search/renderer/overlay_page_notifier_service_im
pl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "components/contextual_search/renderer/overlay_js_render_frame_observer
.h" | 9 #include "components/contextual_search/renderer/overlay_js_render_frame_observer
.h" |
10 | 10 |
11 namespace contextual_search { | 11 namespace contextual_search { |
12 | 12 |
13 OverlayPageNotifierServiceImpl::OverlayPageNotifierServiceImpl( | 13 OverlayPageNotifierServiceImpl::OverlayPageNotifierServiceImpl( |
14 base::WeakPtr<OverlayJsRenderFrameObserver> observer, | 14 base::WeakPtr<OverlayJsRenderFrameObserver> observer) |
15 mojo::InterfaceRequest<mojom::OverlayPageNotifierService> request) | 15 : overlay_js_observer_(observer) {} |
16 : binding_(this, std::move(request)), overlay_js_observer_(observer) {} | |
17 | 16 |
18 OverlayPageNotifierServiceImpl::~OverlayPageNotifierServiceImpl() {} | 17 OverlayPageNotifierServiceImpl::~OverlayPageNotifierServiceImpl() {} |
19 | 18 |
20 void OverlayPageNotifierServiceImpl::NotifyIsContextualSearchOverlay() { | 19 void OverlayPageNotifierServiceImpl::NotifyIsContextualSearchOverlay() { |
21 if (overlay_js_observer_ != nullptr) | 20 if (overlay_js_observer_ != nullptr) |
22 overlay_js_observer_->SetIsContextualSearchOverlay(); | 21 overlay_js_observer_->SetIsContextualSearchOverlay(); |
23 } | 22 } |
24 | 23 |
25 } // namespace contextual_search | 24 } // namespace contextual_search |
OLD | NEW |