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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
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_H_ 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" 12 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
13 #include "content/public/common/page_transition_types.h"
14 #include "ui/base/models/list_selection_model.h" 13 #include "ui/base/models/list_selection_model.h"
14 #include "ui/base/page_transition_types.h"
15 15
16 class Profile; 16 class Profile;
17 class TabStripModelDelegate; 17 class TabStripModelDelegate;
18 class TabStripModelOrderController; 18 class TabStripModelOrderController;
19 19
20 namespace content { 20 namespace content {
21 class WebContents; 21 class WebContents;
22 } 22 }
23 23
24 //////////////////////////////////////////////////////////////////////////////// 24 ////////////////////////////////////////////////////////////////////////////////
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // Returns the index of the last WebContents in the model opened by the 287 // Returns the index of the last WebContents in the model opened by the
288 // specified opener, starting at |start_index|. 288 // specified opener, starting at |start_index|.
289 int GetIndexOfLastWebContentsOpenedBy(const content::WebContents* opener, 289 int GetIndexOfLastWebContentsOpenedBy(const content::WebContents* opener,
290 int start_index) const; 290 int start_index) const;
291 291
292 // To be called when a navigation is about to occur in the specified 292 // To be called when a navigation is about to occur in the specified
293 // WebContents. Depending on the tab, and the transition type of the 293 // WebContents. Depending on the tab, and the transition type of the
294 // navigation, the TabStripModel may adjust its selection and grouping 294 // navigation, the TabStripModel may adjust its selection and grouping
295 // behavior. 295 // behavior.
296 void TabNavigating(content::WebContents* contents, 296 void TabNavigating(content::WebContents* contents,
297 content::PageTransition transition); 297 ui::PageTransition transition);
298 298
299 // Forget all Opener relationships that are stored (but _not_ group 299 // Forget all Opener relationships that are stored (but _not_ group
300 // relationships!) This is to reduce unpredictable tab switching behavior 300 // relationships!) This is to reduce unpredictable tab switching behavior
301 // in complex session states. The exact circumstances under which this method 301 // in complex session states. The exact circumstances under which this method
302 // is called are left up to the implementation of the selected 302 // is called are left up to the implementation of the selected
303 // TabStripModelOrderController. 303 // TabStripModelOrderController.
304 void ForgetAllOpeners(); 304 void ForgetAllOpeners();
305 305
306 // Forgets the group affiliation of the specified WebContents. This 306 // Forgets the group affiliation of the specified WebContents. This
307 // should be called when a WebContents that is part of a logical group 307 // should be called when a WebContents that is part of a logical group
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 // Command level API ///////////////////////////////////////////////////////// 376 // Command level API /////////////////////////////////////////////////////////
377 377
378 // Adds a WebContents at the best position in the TabStripModel given 378 // Adds a WebContents at the best position in the TabStripModel given
379 // the specified insertion index, transition, etc. |add_types| is a bitmask of 379 // the specified insertion index, transition, etc. |add_types| is a bitmask of
380 // AddTabTypes; see it for details. This method ends up calling into 380 // AddTabTypes; see it for details. This method ends up calling into
381 // InsertWebContentsAt to do the actual insertion. Pass kNoTab for |index| to 381 // InsertWebContentsAt to do the actual insertion. Pass kNoTab for |index| to
382 // append the contents to the end of the tab strip. 382 // append the contents to the end of the tab strip.
383 void AddWebContents(content::WebContents* contents, 383 void AddWebContents(content::WebContents* contents,
384 int index, 384 int index,
385 content::PageTransition transition, 385 ui::PageTransition transition,
386 int add_types); 386 int add_types);
387 387
388 // Closes the selected tabs. 388 // Closes the selected tabs.
389 void CloseSelectedTabs(); 389 void CloseSelectedTabs();
390 390
391 // Select adjacent tabs 391 // Select adjacent tabs
392 void SelectNextTab(); 392 void SelectNextTab();
393 void SelectPreviousTab(); 393 void SelectPreviousTab();
394 394
395 // Selects the last tab in the tab strip. 395 // Selects the last tab in the tab strip.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 575
576 // TODO(sky): remove this; used for debugging 291265. 576 // TODO(sky): remove this; used for debugging 291265.
577 bool in_notify_; 577 bool in_notify_;
578 578
579 base::WeakPtrFactory<TabStripModel> weak_factory_; 579 base::WeakPtrFactory<TabStripModel> weak_factory_;
580 580
581 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); 581 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel);
582 }; 582 };
583 583
584 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ 584 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698