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

Side by Side Diff: chrome/browser/tabs/tab_strip_model.cc

Issue 3012001: Move implementation from header to source. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: blank line Created 10 years, 5 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/tabs/tab_strip_model.h" 5 #include "chrome/browser/tabs/tab_strip_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 28 matching lines...) Expand all
39 return transition == PageTransition::TYPED || 39 return transition == PageTransition::TYPED ||
40 transition == PageTransition::AUTO_BOOKMARK || 40 transition == PageTransition::AUTO_BOOKMARK ||
41 transition == PageTransition::GENERATED || 41 transition == PageTransition::GENERATED ||
42 transition == PageTransition::KEYWORD || 42 transition == PageTransition::KEYWORD ||
43 transition == PageTransition::START_PAGE; 43 transition == PageTransition::START_PAGE;
44 } 44 }
45 45
46 } // namespace 46 } // namespace
47 47
48 /////////////////////////////////////////////////////////////////////////////// 48 ///////////////////////////////////////////////////////////////////////////////
49 // TabStripModelObserver, public:
50
51 void TabStripModelObserver::TabInsertedAt(TabContents* contents,
52 int index,
53 bool foreground) {
54 }
55
56 void TabStripModelObserver::TabClosingAt(TabContents* contents, int index) {
57 }
58
59 void TabStripModelObserver::TabDetachedAt(TabContents* contents, int index) {
60 }
61
62 void TabStripModelObserver::TabDeselectedAt(TabContents* contents, int index) {
63 }
64
65 void TabStripModelObserver::TabSelectedAt(TabContents* old_contents,
66 TabContents* new_contents,
67 int index,
68 bool user_gesture) {
69 }
70
71 void TabStripModelObserver::TabMoved(TabContents* contents,
72 int from_index,
73 int to_index) {
74 }
75
76 void TabStripModelObserver::TabChangedAt(TabContents* contents, int index,
77 TabChangeType change_type) {
78 }
79
80 void TabStripModelObserver::TabReplacedAt(TabContents* old_contents,
81 TabContents* new_contents,
82 int index) {
83 }
84
85 void TabStripModelObserver::TabPinnedStateChanged(TabContents* contents,
86 int index) {
87 }
88
89 void TabStripModelObserver::TabMiniStateChanged(TabContents* contents,
90 int index) {
91 }
92
93 void TabStripModelObserver::TabBlockedStateChanged(TabContents* contents,
94 int index) {
95 }
96
97 void TabStripModelObserver::TabStripEmpty() {}
98
99 void TabStripModelObserver::TabStripModelDeleted() {}
100
101 ///////////////////////////////////////////////////////////////////////////////
102 // TabStripModelDelegate, public:
103
104 bool TabStripModelDelegate::CanCloseTab() const {
105 return true;
106 }
107
108 ///////////////////////////////////////////////////////////////////////////////
49 // TabStripModel, public: 109 // TabStripModel, public:
50 110
51 TabStripModel::TabStripModel(TabStripModelDelegate* delegate, Profile* profile) 111 TabStripModel::TabStripModel(TabStripModelDelegate* delegate, Profile* profile)
52 : delegate_(delegate), 112 : delegate_(delegate),
53 selected_index_(kNoTab), 113 selected_index_(kNoTab),
54 profile_(profile), 114 profile_(profile),
55 closing_all_(false), 115 closing_all_(false),
56 order_controller_(NULL) { 116 order_controller_(NULL) {
57 DCHECK(delegate_); 117 DCHECK(delegate_);
58 registrar_.Add(this, 118 registrar_.Add(this,
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 FOR_EACH_OBSERVER(TabStripModelObserver, observers_, 1141 FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
1082 TabMoved(moved_data->contents, index, to_position)); 1142 TabMoved(moved_data->contents, index, to_position));
1083 } 1143 }
1084 1144
1085 // static 1145 // static
1086 bool TabStripModel::OpenerMatches(const TabContentsData* data, 1146 bool TabStripModel::OpenerMatches(const TabContentsData* data,
1087 const NavigationController* opener, 1147 const NavigationController* opener,
1088 bool use_group) { 1148 bool use_group) {
1089 return data->opener == opener || (use_group && data->group == opener); 1149 return data->opener == opener || (use_group && data->group == opener);
1090 } 1150 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698