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_js_render_frame_observer
.h" | 5 #include "components/contextual_search/renderer/overlay_js_render_frame_observer
.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "components/contextual_search/renderer/contextual_search_wrapper.h" | 10 #include "components/contextual_search/renderer/contextual_search_wrapper.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 void OverlayJsRenderFrameObserver::DidFinishLoad() { | 52 void OverlayJsRenderFrameObserver::DidFinishLoad() { |
53 // If no message about the Contextual Search overlay was received at this | 53 // If no message about the Contextual Search overlay was received at this |
54 // point, there will not be one; remove the OverlayPageNotifierService | 54 // point, there will not be one; remove the OverlayPageNotifierService |
55 // from the registry. | 55 // from the registry. |
56 render_frame() | 56 render_frame() |
57 ->GetServiceRegistry() | 57 ->GetServiceRegistry() |
58 ->RemoveService<mojom::OverlayPageNotifierService>(); | 58 ->RemoveService<mojom::OverlayPageNotifierService>(); |
59 } | 59 } |
60 | 60 |
| 61 void OverlayJsRenderFrameObserver::OnDestruct() { |
| 62 delete this; |
| 63 } |
| 64 |
61 } // namespace contextual_search | 65 } // namespace contextual_search |
OLD | NEW |