Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: chrome/browser/ui/browser.h

Issue 7134026: Multi-tab: Renaming TabStripModel::GetSelectedTabContents to GetActiveTabContents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming in tab_strip_controller.mm too. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tabs/tab_strip_model_unittest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_UI_BROWSER_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_H_
6 #define CHROME_BROWSER_UI_BROWSER_H_ 6 #define CHROME_BROWSER_UI_BROWSER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // TabStripModel pass-thrus ///////////////////////////////////////////////// 353 // TabStripModel pass-thrus /////////////////////////////////////////////////
354 354
355 TabStripModel* tabstrip_model() const { 355 TabStripModel* tabstrip_model() const {
356 // TODO(beng): remove this accessor. It violates google style. 356 // TODO(beng): remove this accessor. It violates google style.
357 return tab_handler_->GetTabStripModel(); 357 return tab_handler_->GetTabStripModel();
358 } 358 }
359 359
360 int tab_count() const; 360 int tab_count() const;
361 int active_index() const; 361 int active_index() const;
362 int GetIndexOfController(const NavigationController* controller) const; 362 int GetIndexOfController(const NavigationController* controller) const;
363 // TODO(dpapad): Rename to GetActiveTabContentsWrapper().
363 TabContentsWrapper* GetSelectedTabContentsWrapper() const; 364 TabContentsWrapper* GetSelectedTabContentsWrapper() const;
364 TabContentsWrapper* GetTabContentsWrapperAt(int index) const; 365 TabContentsWrapper* GetTabContentsWrapperAt(int index) const;
365 // Same as above but correctly handles if GetSelectedTabContents() is NULL 366 // Same as above but correctly handles if GetSelectedTabContents() is NULL
366 // in the model before dereferencing to get the raw TabContents. 367 // in the model before dereferencing to get the raw TabContents.
367 // TODO(pinkerton): These should really be returning TabContentsWrapper 368 // TODO(pinkerton): These should really be returning TabContentsWrapper
368 // objects, but that would require changing about 50+ other files. In order 369 // objects, but that would require changing about 50+ other files. In order
369 // to keep changes localized, the default is to return a TabContents. Note 370 // to keep changes localized, the default is to return a TabContents. Note
370 // this differs from the TabStripModel because it has far fewer clients. 371 // this differs from the TabStripModel because it has far fewer clients.
372 // TODO(dpapad): Rename to GetActiveTabContents().
371 TabContents* GetSelectedTabContents() const; 373 TabContents* GetSelectedTabContents() const;
372 TabContents* GetTabContentsAt(int index) const; 374 TabContents* GetTabContentsAt(int index) const;
373 void ActivateTabAt(int index, bool user_gesture); 375 void ActivateTabAt(int index, bool user_gesture);
374 bool IsTabPinned(int index) const; 376 bool IsTabPinned(int index) const;
375 void CloseAllTabs(); 377 void CloseAllTabs();
376 378
377 // Tab adding/showing functions ///////////////////////////////////////////// 379 // Tab adding/showing functions /////////////////////////////////////////////
378 380
379 // Returns true if the tab strip is editable (for extensions). 381 // Returns true if the tab strip is editable (for extensions).
380 bool IsTabStripEditable() const; 382 bool IsTabStripEditable() const;
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 // Helper which implements the TabRestoreServiceDelegate interface. 1241 // Helper which implements the TabRestoreServiceDelegate interface.
1240 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; 1242 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_;
1241 1243
1242 scoped_ptr<InstantController> instant_; 1244 scoped_ptr<InstantController> instant_;
1243 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; 1245 scoped_ptr<InstantUnloadHandler> instant_unload_handler_;
1244 1246
1245 DISALLOW_COPY_AND_ASSIGN(Browser); 1247 DISALLOW_COPY_AND_ASSIGN(Browser);
1246 }; 1248 };
1247 1249
1248 #endif // CHROME_BROWSER_UI_BROWSER_H_ 1250 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/tabs/tab_strip_model_unittest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698