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

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

Issue 74133003: linux-aura: Restore middle-click on new-tab button behaviour. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "content/public/common/page_transition_types.h" 10 #include "content/public/common/page_transition_types.h"
11 11
12 class Browser; 12 class Browser;
13 class DockInfo; 13 class DockInfo;
14 class GURL;
14 15
15 namespace content { 16 namespace content {
16 class WebContents; 17 class WebContents;
17 } 18 }
18 19
19 namespace gfx { 20 namespace gfx {
20 class Rect; 21 class Rect;
21 } 22 }
22 23
23 /////////////////////////////////////////////////////////////////////////////// 24 ///////////////////////////////////////////////////////////////////////////////
(...skipping 20 matching lines...) Expand all
44 RESTORE_TAB, 45 RESTORE_TAB,
45 RESTORE_WINDOW 46 RESTORE_WINDOW
46 }; 47 };
47 48
48 virtual ~TabStripModelDelegate() {} 49 virtual ~TabStripModelDelegate() {}
49 50
50 // Adds what the delegate considers to be a blank tab to the model. An |index| 51 // Adds what the delegate considers to be a blank tab to the model. An |index|
51 // value of -1 means to append the contents to the end of the tab strip. 52 // value of -1 means to append the contents to the end of the tab strip.
52 virtual void AddBlankTabAt(int index, bool foreground) = 0; 53 virtual void AddBlankTabAt(int index, bool foreground) = 0;
53 54
55 // Adds a tab to the model and loads |url| in the tab. An |index| value of -1
56 // means to append the contents to the end of the tab strip.
57 virtual void AddURLTabAt(const GURL& url, int index, bool foreground) = 0;
58
54 // Asks for a new TabStripModel to be created and the given web contentses to 59 // Asks for a new TabStripModel to be created and the given web contentses to
55 // be added to it. Its size and position are reflected in |window_bounds|. 60 // be added to it. Its size and position are reflected in |window_bounds|.
56 // If |dock_info|'s type is other than NONE, the newly created window should 61 // If |dock_info|'s type is other than NONE, the newly created window should
57 // be docked as identified by |dock_info|. Returns the Browser object 62 // be docked as identified by |dock_info|. Returns the Browser object
58 // representing the newly created window and tab strip. This does not 63 // representing the newly created window and tab strip. This does not
59 // show the window; it's up to the caller to do so. 64 // show the window; it's up to the caller to do so.
60 // 65 //
61 // TODO(avi): This is a layering violation; the TabStripModel should not know 66 // TODO(avi): This is a layering violation; the TabStripModel should not know
62 // about the Browser type. At least fix so that this returns a 67 // about the Browser type. At least fix so that this returns a
63 // TabStripModelDelegate, or perhaps even move this code elsewhere. 68 // TabStripModelDelegate, or perhaps even move this code elsewhere.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 117
113 // Returns true if we should allow "bookmark all tabs" in this window; this is 118 // Returns true if we should allow "bookmark all tabs" in this window; this is
114 // true when there is more than one bookmarkable tab open. 119 // true when there is more than one bookmarkable tab open.
115 virtual bool CanBookmarkAllTabs() const = 0; 120 virtual bool CanBookmarkAllTabs() const = 0;
116 121
117 // Creates a bookmark folder containing a bookmark for all open tabs. 122 // Creates a bookmark folder containing a bookmark for all open tabs.
118 virtual void BookmarkAllTabs() = 0; 123 virtual void BookmarkAllTabs() = 0;
119 }; 124 };
120 125
121 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ 126 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698