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

Side by Side Diff: ios/shared/chrome/browser/tabs/web_state_list_order_controller.h

Issue 2699833004: Add WebStateListOrderController to control WebState insertion. (Closed)
Patch Set: Address comments. Created 3 years, 10 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_ORDER_CONTROLLER_H_
6 #define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_ORDER_CONTROLLER_H_
7
8 #include "base/macros.h"
9 #include "ui/base/page_transition_types.h"
10
11 class WebStateList;
12
13 namespace web {
14 class WebState;
15 }
16
17 // WebStateListOrderController allows different types of ordering and
18 // selection heuristics to be plugged into WebStateList.
19 class WebStateListOrderController {
20 public:
21 explicit WebStateListOrderController(WebStateList* web_state_list);
22 ~WebStateListOrderController();
23
24 // Determines where to place a newly opened WebState by using the supplied
25 // transition, opener and background flag.
26 int DetermineInsertionIndex(ui::PageTransition transition,
27 web::WebState* opener) const;
28
29 private:
30 WebStateList* web_state_list_;
31
32 DISALLOW_COPY_AND_ASSIGN(WebStateListOrderController);
33 };
34
35 #endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_ORDER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ios/shared/chrome/browser/tabs/web_state_list.mm ('k') | ios/shared/chrome/browser/tabs/web_state_list_order_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698