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 #ifndef COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_OVERLAY_JS_RENDER_FRAME_OBSERVER_H
_ | 5 #ifndef COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_OVERLAY_JS_RENDER_FRAME_OBSERVER_H
_ |
6 #define COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_OVERLAY_JS_RENDER_FRAME_OBSERVER_H
_ | 6 #define COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_OVERLAY_JS_RENDER_FRAME_OBSERVER_H
_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "components/contextual_search/common/overlay_page_notifier_service.mojo
m.h" | 10 #include "components/contextual_search/common/overlay_page_notifier_service.mojo
m.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 void DidClearWindowObject() override; | 29 void DidClearWindowObject() override; |
30 void DidFinishLoad() override; | 30 void DidFinishLoad() override; |
31 | 31 |
32 // Flag the current page as a contextual search overlay. | 32 // Flag the current page as a contextual search overlay. |
33 void SetIsContextualSearchOverlay(); | 33 void SetIsContextualSearchOverlay(); |
34 | 34 |
35 private: | 35 private: |
36 // RenderFrameObserver implementation. | 36 // RenderFrameObserver implementation. |
37 void OnDestruct() override; | 37 void OnDestruct() override; |
38 | 38 |
39 // Add the mojo service to a RenderFrame's service registry. | 39 // Add the mojo interface to a RenderFrame's shell::InterfaceRegistry. |
40 void RegisterMojoService(); | 40 void RegisterMojoInterface(); |
41 void CreateOverlayPageNotifierService( | 41 void CreateOverlayPageNotifierService( |
42 mojo::InterfaceRequest<mojom::OverlayPageNotifierService> request); | 42 mojo::InterfaceRequest<mojom::OverlayPageNotifierService> request); |
43 | 43 |
44 // Track if the current page is presented in the contextual search overlay. | 44 // Track if the current page is presented in the contextual search overlay. |
45 bool is_contextual_search_overlay_; | 45 bool is_contextual_search_overlay_; |
46 | 46 |
47 base::WeakPtrFactory<OverlayJsRenderFrameObserver> weak_factory_; | 47 base::WeakPtrFactory<OverlayJsRenderFrameObserver> weak_factory_; |
48 | 48 |
49 DISALLOW_COPY_AND_ASSIGN(OverlayJsRenderFrameObserver); | 49 DISALLOW_COPY_AND_ASSIGN(OverlayJsRenderFrameObserver); |
50 }; | 50 }; |
51 | 51 |
52 } // namespace contextual_search | 52 } // namespace contextual_search |
53 | 53 |
54 #endif // COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_OVERLAY_JS_RENDER_FRAME_OBSERVE
R_H_ | 54 #endif // COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_OVERLAY_JS_RENDER_FRAME_OBSERVE
R_H_ |
OLD | NEW |