scottmg | 276753cf | 2016-10-27 18:25:22 | [diff] [blame] | 1 | // Copyright 2016 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 CONTENT_BROWSER_HOST_ZOOM_MAP_OBSERVER_H_ |
| 6 | #define CONTENT_BROWSER_HOST_ZOOM_MAP_OBSERVER_H_ |
| 7 | |
| 8 | #include "content/common/host_zoom.mojom.h" |
| 9 | #include "content/public/browser/web_contents_observer.h" |
| 10 | |
| 11 | namespace content { |
| 12 | |
| 13 | class RenderFrameHost; |
| 14 | |
| 15 | class HostZoomMapObserver : private WebContentsObserver { |
| 16 | public: |
| 17 | explicit HostZoomMapObserver(WebContents* web_contents); |
| 18 | ~HostZoomMapObserver() override; |
| 19 | |
| 20 | private: |
| 21 | // WebContentsObserver implementation: |
| 22 | void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override; |
| 23 | void RenderFrameCreated(RenderFrameHost* rfh) override; |
blundell | e7aa329 | 2017-01-05 12:38:55 | [diff] [blame] | 24 | void RenderFrameDeleted(RenderFrameHost* rfh) override; |
scottmg | 276753cf | 2016-10-27 18:25:22 | [diff] [blame] | 25 | |
blundell | e7aa329 | 2017-01-05 12:38:55 | [diff] [blame] | 26 | std::map<RenderFrameHost*, mojom::HostZoomAssociatedPtr> host_zoom_ptrs_; |
scottmg | 276753cf | 2016-10-27 18:25:22 | [diff] [blame] | 27 | }; |
| 28 | |
| 29 | } // namespace content |
| 30 | |
| 31 | #endif // CONTENT_BROWSER_HOST_ZOOM_MAP_OBSERVER_H_ |