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

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

Issue 11364196: Remove TabContents from TabStripModelObserver::ActiveTabChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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) 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_UI_TABS_TAB_STRIP_MODEL_ORDER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_ORDER_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_ORDER_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_ORDER_CONTROLLER_H_
7 7
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "content/public/common/page_transition_types.h" 9 #include "content/public/common/page_transition_types.h"
10 10
(...skipping 24 matching lines...) Expand all
35 content::PageTransition transition, 35 content::PageTransition transition,
36 bool foreground); 36 bool foreground);
37 37
38 // Returns the index to append tabs at. 38 // Returns the index to append tabs at.
39 int DetermineInsertionIndexForAppending(); 39 int DetermineInsertionIndexForAppending();
40 40
41 // Determine where to shift selection after a tab is closed. 41 // Determine where to shift selection after a tab is closed.
42 int DetermineNewSelectedIndex(int removed_index) const; 42 int DetermineNewSelectedIndex(int removed_index) const;
43 43
44 // Overridden from TabStripModelObserver: 44 // Overridden from TabStripModelObserver:
45 virtual void ActiveTabChanged(TabContents* old_contents, 45 virtual void ActiveTabChanged(content::WebContents* old_contents,
46 TabContents* new_contents, 46 content::WebContents* new_contents,
47 int index, 47 int index,
48 bool user_gesture) OVERRIDE; 48 bool user_gesture) OVERRIDE;
49 49
50 private: 50 private:
51 // Returns a valid index to be selected after the tab at |removing_index| is 51 // Returns a valid index to be selected after the tab at |removing_index| is
52 // closed. If |index| is after |removing_index|, |index| is adjusted to 52 // closed. If |index| is after |removing_index|, |index| is adjusted to
53 // reflect the fact that |removing_index| is going away. 53 // reflect the fact that |removing_index| is going away.
54 int GetValidIndex(int index, int removing_index) const; 54 int GetValidIndex(int index, int removing_index) const;
55 55
56 TabStripModel* tabstrip_; 56 TabStripModel* tabstrip_;
57 57
58 TabStripModel::InsertionPolicy insertion_policy_; 58 TabStripModel::InsertionPolicy insertion_policy_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(TabStripModelOrderController); 60 DISALLOW_COPY_AND_ASSIGN(TabStripModelOrderController);
61 }; 61 };
62 62
63 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_ORDER_CONTROLLER_H_ 63 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_ORDER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model_observer.cc ('k') | chrome/browser/ui/tabs/tab_strip_model_order_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698