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

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

Issue 10698068: chrome: Put browser_navigator.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: already in chrome namespace Created 8 years, 5 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 | 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 #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/extension_tab_helper.h" 10 #include "chrome/browser/extensions/extension_tab_helper.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 if (index != -1 && !drop_before) { 311 if (index != -1 && !drop_before) {
312 hover_tab_selector_.StartTabTransition(index); 312 hover_tab_selector_.StartTabTransition(index);
313 } else { 313 } else {
314 hover_tab_selector_.CancelTabTransition(); 314 hover_tab_selector_.CancelTabTransition();
315 } 315 }
316 } 316 }
317 317
318 void BrowserTabStripController::PerformDrop(bool drop_before, 318 void BrowserTabStripController::PerformDrop(bool drop_before,
319 int index, 319 int index,
320 const GURL& url) { 320 const GURL& url) {
321 browser::NavigateParams params( 321 chrome::NavigateParams params(browser_, url, content::PAGE_TRANSITION_LINK);
322 browser_, url, content::PAGE_TRANSITION_LINK);
323 params.tabstrip_index = index; 322 params.tabstrip_index = index;
324 323
325 if (drop_before) { 324 if (drop_before) {
326 content::RecordAction(UserMetricsAction("Tab_DropURLBetweenTabs")); 325 content::RecordAction(UserMetricsAction("Tab_DropURLBetweenTabs"));
327 params.disposition = NEW_FOREGROUND_TAB; 326 params.disposition = NEW_FOREGROUND_TAB;
328 } else { 327 } else {
329 content::RecordAction(UserMetricsAction("Tab_DropURLOnTab")); 328 content::RecordAction(UserMetricsAction("Tab_DropURLOnTab"));
330 params.disposition = CURRENT_TAB; 329 params.disposition = CURRENT_TAB;
331 params.source_contents = model_->GetTabContentsAt(index); 330 params.source_contents = model_->GetTabContentsAt(index);
332 } 331 }
333 params.window_action = browser::NavigateParams::SHOW_WINDOW; 332 params.window_action = chrome::NavigateParams::SHOW_WINDOW;
334 browser::Navigate(&params); 333 chrome::Navigate(&params);
335 } 334 }
336 335
337 bool BrowserTabStripController::IsCompatibleWith(TabStrip* other) const { 336 bool BrowserTabStripController::IsCompatibleWith(TabStrip* other) const {
338 Profile* other_profile = 337 Profile* other_profile =
339 static_cast<BrowserTabStripController*>(other->controller())->profile(); 338 static_cast<BrowserTabStripController*>(other->controller())->profile();
340 return other_profile == profile(); 339 return other_profile == profile();
341 } 340 }
342 341
343 void BrowserTabStripController::CreateNewTab() { 342 void BrowserTabStripController::CreateNewTab() {
344 model_->delegate()->AddBlankTab(true); 343 model_->delegate()->AddBlankTab(true);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 SetTabRendererDataFromModel(contents->web_contents(), index, &data, NEW_TAB); 584 SetTabRendererDataFromModel(contents->web_contents(), index, &data, NEW_TAB);
586 tabstrip_->AddTabAt(index, data, is_active); 585 tabstrip_->AddTabAt(index, data, is_active);
587 } 586 }
588 587
589 void BrowserTabStripController::UpdateLayoutType() { 588 void BrowserTabStripController::UpdateLayoutType() {
590 bool adjust_layout = false; 589 bool adjust_layout = false;
591 TabStripLayoutType layout_type = 590 TabStripLayoutType layout_type =
592 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); 591 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout);
593 tabstrip_->SetLayoutType(layout_type, adjust_layout); 592 tabstrip_->SetLayoutType(layout_type, adjust_layout);
594 } 593 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698