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/intents/web_intent_picker_controller.h" | 5 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 service_tab_); | 562 service_tab_); |
563 browser->tab_strip_model()->CloseWebContentsAt( | 563 browser->tab_strip_model()->CloseWebContentsAt( |
564 index, TabStripModel::CLOSE_CREATE_HISTORICAL_TAB); | 564 index, TabStripModel::CLOSE_CREATE_HISTORICAL_TAB); |
565 | 565 |
566 // Activate source tab. | 566 // Activate source tab. |
567 Browser* source_browser = | 567 Browser* source_browser = |
568 browser::FindBrowserWithWebContents(web_contents_); | 568 browser::FindBrowserWithWebContents(web_contents_); |
569 if (source_browser) { | 569 if (source_browser) { |
570 int source_index = source_browser->tab_strip_model()-> | 570 int source_index = source_browser->tab_strip_model()-> |
571 GetIndexOfWebContents(web_contents_); | 571 GetIndexOfWebContents(web_contents_); |
572 chrome::ActivateTabAt(source_browser, source_index, false); | 572 source_browser->tab_strip_model()->ActivateTabAt(source_index, false); |
573 } | 573 } |
574 } | 574 } |
575 service_tab_ = NULL; | 575 service_tab_ = NULL; |
576 } | 576 } |
577 | 577 |
578 intents_dispatcher_ = NULL; | 578 intents_dispatcher_ = NULL; |
579 } | 579 } |
580 | 580 |
581 void WebIntentPickerController::AddServiceToModel( | 581 void WebIntentPickerController::AddServiceToModel( |
582 const webkit_glue::WebIntentServiceData& service) { | 582 const webkit_glue::WebIntentServiceData& service) { |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 content::DownloadManager* download_manager = | 967 content::DownloadManager* download_manager = |
968 content::BrowserContext::GetDownloadManager(profile); | 968 content::BrowserContext::GetDownloadManager(profile); |
969 if (!download_manager) | 969 if (!download_manager) |
970 return; | 970 return; |
971 content::DownloadItem* item = | 971 content::DownloadItem* item = |
972 download_manager->GetDownload(download_id_.local()); | 972 download_manager->GetDownload(download_id_.local()); |
973 if (item) | 973 if (item) |
974 item->Cancel(true); | 974 item->Cancel(true); |
975 download_id_ = content::DownloadId(); | 975 download_id_ = content::DownloadId(); |
976 } | 976 } |
OLD | NEW |