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

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

Issue 10897034: First part of PAGE_TRANSITION_START_PAGE cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 3 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) 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 #include "chrome/browser/ui/tabs/tab_strip_model.h" 5 #include "chrome/browser/ui/tabs/tab_strip_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // Returns true if the specified transition is one of the types that cause the 48 // Returns true if the specified transition is one of the types that cause the
49 // opener relationships for the tab in which the transition occured to be 49 // opener relationships for the tab in which the transition occured to be
50 // forgotten. This is generally any navigation that isn't a link click (i.e. 50 // forgotten. This is generally any navigation that isn't a link click (i.e.
51 // any navigation that can be considered to be the start of a new task distinct 51 // any navigation that can be considered to be the start of a new task distinct
52 // from what had previously occurred in that tab). 52 // from what had previously occurred in that tab).
53 bool ShouldForgetOpenersForTransition(content::PageTransition transition) { 53 bool ShouldForgetOpenersForTransition(content::PageTransition transition) {
54 return transition == content::PAGE_TRANSITION_TYPED || 54 return transition == content::PAGE_TRANSITION_TYPED ||
55 transition == content::PAGE_TRANSITION_AUTO_BOOKMARK || 55 transition == content::PAGE_TRANSITION_AUTO_BOOKMARK ||
56 transition == content::PAGE_TRANSITION_GENERATED || 56 transition == content::PAGE_TRANSITION_GENERATED ||
57 transition == content::PAGE_TRANSITION_KEYWORD || 57 transition == content::PAGE_TRANSITION_KEYWORD ||
58 transition == content::PAGE_TRANSITION_START_PAGE; 58 transition == content::PAGE_TRANSITION_AUTO_TOPLEVEL;
59 } 59 }
60 60
61 } // namespace 61 } // namespace
62 62
63 /////////////////////////////////////////////////////////////////////////////// 63 ///////////////////////////////////////////////////////////////////////////////
64 // TabStripModel, public: 64 // TabStripModel, public:
65 65
66 TabStripModel::TabStripModel(TabStripModelDelegate* delegate, Profile* profile) 66 TabStripModel::TabStripModel(TabStripModelDelegate* delegate, Profile* profile)
67 : delegate_(delegate), 67 : delegate_(delegate),
68 profile_(profile), 68 profile_(profile),
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 void TabStripModel::ForgetOpenersAndGroupsReferencing( 1311 void TabStripModel::ForgetOpenersAndGroupsReferencing(
1312 const NavigationController* tab) { 1312 const NavigationController* tab) {
1313 for (TabContentsDataVector::const_iterator i = contents_data_.begin(); 1313 for (TabContentsDataVector::const_iterator i = contents_data_.begin();
1314 i != contents_data_.end(); ++i) { 1314 i != contents_data_.end(); ++i) {
1315 if ((*i)->group == tab) 1315 if ((*i)->group == tab)
1316 (*i)->group = NULL; 1316 (*i)->group = NULL;
1317 if ((*i)->opener == tab) 1317 if ((*i)->opener == tab)
1318 (*i)->opener = NULL; 1318 (*i)->opener = NULL;
1319 } 1319 }
1320 } 1320 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator_impl.cc ('k') | chrome/browser/ui/tabs/tab_strip_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698