OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 IOS_CHROME_BROWSER_SNAPSHOTS_SNAPSHOT_CACHE_WEB_STATE_LIST_OBSERVER_H_ |
| 6 #define IOS_CHROME_BROWSER_SNAPSHOTS_SNAPSHOT_CACHE_WEB_STATE_LIST_OBSERVER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #import "ios/shared/chrome/browser/tabs/web_state_list_observer.h" |
| 10 |
| 11 @class SnapshotCache; |
| 12 |
| 13 // Updates the SnapshotCache when the active Tab changes. |
| 14 class SnapshotCacheWebStateListObserver : public WebStateListObserver { |
| 15 public: |
| 16 explicit SnapshotCacheWebStateListObserver(SnapshotCache* snapshot_cache); |
| 17 ~SnapshotCacheWebStateListObserver() override; |
| 18 |
| 19 private: |
| 20 // WebStateListObserver implementation. |
| 21 void WebStateActivatedAt(WebStateList* web_state_list, |
| 22 web::WebState* old_web_state, |
| 23 web::WebState* new_web_state, |
| 24 int active_index, |
| 25 bool user_action) override; |
| 26 |
| 27 SnapshotCache* snapshot_cache_; |
| 28 |
| 29 DISALLOW_COPY_AND_ASSIGN(SnapshotCacheWebStateListObserver); |
| 30 }; |
| 31 |
| 32 #endif // IOS_CHROME_BROWSER_SNAPSHOTS_SNAPSHOT_CACHE_WEB_STATE_LIST_OBSERVER_H
_ |
OLD | NEW |