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

Side by Side Diff: chrome/browser/ui/browser_tabstrip.cc

Issue 11364053: make StackingClient dispatch to either ash or desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + disable prerender tests on win-aura Created 8 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
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/views/frame/browser_frame.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_tabstrip.h" 5 #include "chrome/browser/ui/browser_tabstrip.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 9 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 content::WebContents* GetWebContentsAt(const Browser* browser, int index) { 49 content::WebContents* GetWebContentsAt(const Browser* browser, int index) {
50 TabContents* tab = GetTabContentsAt(browser, index); 50 TabContents* tab = GetTabContentsAt(browser, index);
51 return tab ? tab->web_contents() : NULL; 51 return tab ? tab->web_contents() : NULL;
52 } 52 }
53 53
54 void ActivateTabAt(Browser* browser, int index, bool user_gesture) { 54 void ActivateTabAt(Browser* browser, int index, bool user_gesture) {
55 browser->tab_strip_model()->ActivateTabAt(index, user_gesture); 55 browser->tab_strip_model()->ActivateTabAt(index, user_gesture);
56 } 56 }
57 57
58 void AddBlankTabAt(Browser* browser, int index, bool foreground) { 58 void AddBlankTabAt(Browser* browser, int index, bool foreground) {
59 // TODO(scottmg): http://crbug.com/128578
60 // This is necessary because WebContentsViewAura doesn't have enough context
61 // to get the right StackingClient (and therefore parent window) otherwise.
62 ScopedForceDesktopType force_desktop_type(browser->host_desktop_type());
63
59 // Time new tab page creation time. We keep track of the timing data in 64 // Time new tab page creation time. We keep track of the timing data in
60 // WebContents, but we want to include the time it takes to create the 65 // WebContents, but we want to include the time it takes to create the
61 // WebContents object too. 66 // WebContents object too.
62 base::TimeTicks new_tab_start_time = base::TimeTicks::Now(); 67 base::TimeTicks new_tab_start_time = base::TimeTicks::Now();
63 chrome::NavigateParams params(browser, GURL(chrome::kChromeUINewTabURL), 68 chrome::NavigateParams params(browser, GURL(chrome::kChromeUINewTabURL),
64 content::PAGE_TRANSITION_TYPED); 69 content::PAGE_TRANSITION_TYPED);
65 params.disposition = foreground ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; 70 params.disposition = foreground ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
66 params.tabstrip_index = index; 71 params.tabstrip_index = index;
67 chrome::Navigate(&params); 72 chrome::Navigate(&params);
68 params.target_contents->web_contents()->SetNewTabStartTime( 73 params.target_contents->web_contents()->SetNewTabStartTime(
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return BrowserTabstripTabContentsCreator::CreateTabContents( 192 return BrowserTabstripTabContentsCreator::CreateTabContents(
188 content::WebContents::CreateWithSessionStorage( 193 content::WebContents::CreateWithSessionStorage(
189 profile, 194 profile,
190 site_instance, 195 site_instance,
191 routing_id, 196 routing_id,
192 base_web_contents, 197 base_web_contents,
193 session_storage_namespace_map)); 198 session_storage_namespace_map));
194 } 199 }
195 200
196 } // namespace chrome 201 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/views/frame/browser_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698