1 // Copyright (c) 2010 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 CHROME_BROWSER_TABS_TAB_HANDLER_H_ 6 #define CHROME_BROWSER_TABS_TAB_HANDLER_H_ 7 #pragma once 8 9 class Browser; 10 class Profile; 11 class TabStripModel; 12 13 class TabHandlerDelegate { 14 public: 15 virtual Profile* GetProfile() const = 0; 16 17 // TODO(beng): remove once decoupling with Browser is complete. 18 virtual Browser* AsBrowser() = 0; 19 }; 20 21 // An interface implemented by an object that can perform tab related 22 // functionality for a Browser. This functionality includes mapping individual 23 // TabContentses into indices for an index-based tab organization scheme for 24 // example. 25 class TabHandler { 26 public: 27 virtual ~TabHandler() {} 28 29 // Creates a TabHandler implementation and returns it, transferring ownership 30 // to the caller. 31 static TabHandler* CreateTabHandler(TabHandlerDelegate* delegate); 32 33 // TODO(beng): remove once decoupling with Browser is complete. 34 virtual TabStripModel* GetTabStripModel() const = 0; 35 }; 36 37 #endif // CHROME_BROWSER_TABS_TAB_HANDLER_H_ 38