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

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

Issue 9015022: Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 // TODO(beng): remove this accessor. It violates google style. 380 // TODO(beng): remove this accessor. It violates google style.
381 return tab_handler_->GetTabStripModel(); 381 return tab_handler_->GetTabStripModel();
382 } 382 }
383 383
384 int tab_count() const; 384 int tab_count() const;
385 int active_index() const; 385 int active_index() const;
386 int GetIndexOfController(const NavigationController* controller) const; 386 int GetIndexOfController(const NavigationController* controller) const;
387 387
388 // TODO(dpapad): Rename to GetActiveTabContentsWrapper(). 388 // TODO(dpapad): Rename to GetActiveTabContentsWrapper().
389 TabContentsWrapper* GetSelectedTabContentsWrapper() const; 389 TabContentsWrapper* GetSelectedTabContentsWrapper() const;
390 // A convenient version of the above which returns the TCW's WebContents.
391 content::WebContents* GetSelectedWebContents() const;
390 TabContentsWrapper* GetTabContentsWrapperAt(int index) const; 392 TabContentsWrapper* GetTabContentsWrapperAt(int index) const;
391 // Same as above but correctly handles if GetSelectedTabContents() is NULL 393 // Same as above but correctly handles if GetSelectedTabContents() is NULL
392 // in the model before dereferencing to get the raw TabContents. 394 // in the model before dereferencing to get the raw TabContents.
393 // TODO(pinkerton): These should really be returning TabContentsWrapper 395 // TODO(pinkerton): These should really be returning TabContentsWrapper
394 // objects, but that would require changing about 50+ other files. In order 396 // objects, but that would require changing about 50+ other files. In order
395 // to keep changes localized, the default is to return a TabContents. Note 397 // to keep changes localized, the default is to return a TabContents. Note
396 // this differs from the TabStripModel because it has far fewer clients. 398 // this differs from the TabStripModel because it has far fewer clients.
397 // TODO(dpapad): Rename to GetActiveTabContents(). 399 // TODO(dpapad): Rename to GetActiveTabContents().
398 TabContents* GetSelectedTabContents() const; 400 TabContents* GetSelectedTabContents() const;
399 TabContents* GetTabContentsAt(int index) const; 401 TabContents* GetTabContentsAt(int index) const;
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 1424
1423 scoped_refptr<FullscreenController> fullscreen_controller_; 1425 scoped_refptr<FullscreenController> fullscreen_controller_;
1424 1426
1425 // True if the browser window has been shown at least once. 1427 // True if the browser window has been shown at least once.
1426 bool window_has_shown_; 1428 bool window_has_shown_;
1427 1429
1428 DISALLOW_COPY_AND_ASSIGN(Browser); 1430 DISALLOW_COPY_AND_ASSIGN(Browser);
1429 }; 1431 };
1430 1432
1431 #endif // CHROME_BROWSER_UI_BROWSER_H_ 1433 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698