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

Side by Side Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc

Issue 11392004: Remove TabContents from AddBlankTabAt, kill AddBlankTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/views/frame/app_non_client_frame_view_ash_browsertest.cc ('k') | no next file » | 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/views/tabs/browser_tab_strip_controller.h" 5 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/extensions/tab_helper.h" 10 #include "chrome/browser/extensions/tab_helper.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 chrome::Navigate(&params); 335 chrome::Navigate(&params);
336 } 336 }
337 337
338 bool BrowserTabStripController::IsCompatibleWith(TabStrip* other) const { 338 bool BrowserTabStripController::IsCompatibleWith(TabStrip* other) const {
339 Profile* other_profile = 339 Profile* other_profile =
340 static_cast<BrowserTabStripController*>(other->controller())->profile(); 340 static_cast<BrowserTabStripController*>(other->controller())->profile();
341 return other_profile == profile(); 341 return other_profile == profile();
342 } 342 }
343 343
344 void BrowserTabStripController::CreateNewTab() { 344 void BrowserTabStripController::CreateNewTab() {
345 model_->delegate()->AddBlankTab(true); 345 model_->delegate()->AddBlankTabAt(-1, true);
346 } 346 }
347 347
348 void BrowserTabStripController::ClickActiveTab(int index) { 348 void BrowserTabStripController::ClickActiveTab(int index) {
349 DCHECK(model_->active_index() == index); 349 DCHECK(model_->active_index() == index);
350 model_->ActiveTabClicked(index); 350 model_->ActiveTabClicked(index);
351 } 351 }
352 352
353 bool BrowserTabStripController::IsIncognito() { 353 bool BrowserTabStripController::IsIncognito() {
354 return browser_->profile()->IsOffTheRecord(); 354 return browser_->profile()->IsOffTheRecord();
355 } 355 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 SetTabRendererDataFromModel(contents->web_contents(), index, &data, NEW_TAB); 521 SetTabRendererDataFromModel(contents->web_contents(), index, &data, NEW_TAB);
522 tabstrip_->AddTabAt(index, data, is_active); 522 tabstrip_->AddTabAt(index, data, is_active);
523 } 523 }
524 524
525 void BrowserTabStripController::UpdateLayoutType() { 525 void BrowserTabStripController::UpdateLayoutType() {
526 bool adjust_layout = false; 526 bool adjust_layout = false;
527 TabStripLayoutType layout_type = 527 TabStripLayoutType layout_type =
528 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); 528 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout);
529 tabstrip_->SetLayoutType(layout_type, adjust_layout); 529 tabstrip_->SetLayoutType(layout_type, adjust_layout);
530 } 530 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/app_non_client_frame_view_ash_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698