OLD | NEW |
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/macros.h" | 8 #include "base/macros.h" |
9 #include "base/task_runner_util.h" | 9 #include "base/task_runner_util.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 } | 345 } |
346 | 346 |
347 void BrowserTabStripController::PerformDrop(bool drop_before, | 347 void BrowserTabStripController::PerformDrop(bool drop_before, |
348 int index, | 348 int index, |
349 const GURL& url) { | 349 const GURL& url) { |
350 chrome::NavigateParams params(browser_, url, ui::PAGE_TRANSITION_LINK); | 350 chrome::NavigateParams params(browser_, url, ui::PAGE_TRANSITION_LINK); |
351 params.tabstrip_index = index; | 351 params.tabstrip_index = index; |
352 | 352 |
353 if (drop_before) { | 353 if (drop_before) { |
354 content::RecordAction(UserMetricsAction("Tab_DropURLBetweenTabs")); | 354 content::RecordAction(UserMetricsAction("Tab_DropURLBetweenTabs")); |
355 params.disposition = NEW_FOREGROUND_TAB; | 355 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
356 } else { | 356 } else { |
357 content::RecordAction(UserMetricsAction("Tab_DropURLOnTab")); | 357 content::RecordAction(UserMetricsAction("Tab_DropURLOnTab")); |
358 params.disposition = CURRENT_TAB; | 358 params.disposition = WindowOpenDisposition::CURRENT_TAB; |
359 params.source_contents = model_->GetWebContentsAt(index); | 359 params.source_contents = model_->GetWebContentsAt(index); |
360 } | 360 } |
361 params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 361 params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
362 chrome::Navigate(¶ms); | 362 chrome::Navigate(¶ms); |
363 } | 363 } |
364 | 364 |
365 bool BrowserTabStripController::IsCompatibleWith(TabStrip* other) const { | 365 bool BrowserTabStripController::IsCompatibleWith(TabStrip* other) const { |
366 Profile* other_profile = | 366 Profile* other_profile = |
367 static_cast<BrowserTabStripController*>(other->controller())->profile(); | 367 static_cast<BrowserTabStripController*>(other->controller())->profile(); |
368 return other_profile == profile(); | 368 return other_profile == profile(); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 content::WebPluginInfo plugin; | 581 content::WebPluginInfo plugin; |
582 tabstrip_->FileSupported( | 582 tabstrip_->FileSupported( |
583 url, | 583 url, |
584 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) || | 584 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) || |
585 content::PluginService::GetInstance()->GetPluginInfo( | 585 content::PluginService::GetInstance()->GetPluginInfo( |
586 -1, // process ID | 586 -1, // process ID |
587 MSG_ROUTING_NONE, // routing ID | 587 MSG_ROUTING_NONE, // routing ID |
588 model_->profile()->GetResourceContext(), url, GURL(), mime_type, | 588 model_->profile()->GetResourceContext(), url, GURL(), mime_type, |
589 false, NULL, &plugin, NULL)); | 589 false, NULL, &plugin, NULL)); |
590 } | 590 } |
OLD | NEW |