| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ |
| 6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ | 6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); | 257 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); |
| 258 | 258 |
| 259 // TabStripModelObserver overrides. | 259 // TabStripModelObserver overrides. |
| 260 void TabChangedAt(content::WebContents* contents, | 260 void TabChangedAt(content::WebContents* contents, |
| 261 int index, | 261 int index, |
| 262 TabChangeType change_type) override; | 262 TabChangeType change_type) override; |
| 263 void ActiveTabChanged(content::WebContents* old_contents, | 263 void ActiveTabChanged(content::WebContents* old_contents, |
| 264 content::WebContents* new_contents, | 264 content::WebContents* new_contents, |
| 265 int index, | 265 int index, |
| 266 int reason) override; | 266 int reason) override; |
| 267 void TabInsertedAt(content::WebContents* contents, | 267 void TabInsertedAt(TabStripModel* tab_strip_model, |
| 268 content::WebContents* contents, |
| 268 int index, | 269 int index, |
| 269 bool foreground) override; | 270 bool foreground) override; |
| 270 | 271 |
| 271 // Returns true if the tab is currently playing audio or has played audio | 272 // Returns true if the tab is currently playing audio or has played audio |
| 272 // recently, or if the tab is currently accessing the camera, microphone or | 273 // recently, or if the tab is currently accessing the camera, microphone or |
| 273 // mirroring the display. | 274 // mirroring the display. |
| 274 bool IsMediaTab(content::WebContents* contents) const; | 275 bool IsMediaTab(content::WebContents* contents) const; |
| 275 | 276 |
| 276 // Returns the WebContentsData associated with |contents|. Also takes care of | 277 // Returns the WebContentsData associated with |contents|. Also takes care of |
| 277 // creating one if needed. | 278 // creating one if needed. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 379 |
| 379 // Weak pointer factory used for posting delayed tasks to task_runner_. | 380 // Weak pointer factory used for posting delayed tasks to task_runner_. |
| 380 base::WeakPtrFactory<TabManager> weak_ptr_factory_; | 381 base::WeakPtrFactory<TabManager> weak_ptr_factory_; |
| 381 | 382 |
| 382 DISALLOW_COPY_AND_ASSIGN(TabManager); | 383 DISALLOW_COPY_AND_ASSIGN(TabManager); |
| 383 }; | 384 }; |
| 384 | 385 |
| 385 } // namespace memory | 386 } // namespace memory |
| 386 | 387 |
| 387 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ | 388 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ |
| OLD | NEW |