OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/webui/active_downloads_ui.h" | 5 #include "chrome/browser/ui/webui/active_downloads_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); | 396 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); |
397 profile->GetChromeURLDataManager()->AddDataSource(html_source); | 397 profile->GetChromeURLDataManager()->AddDataSource(html_source); |
398 } | 398 } |
399 | 399 |
400 #if defined(TOUCH_UI) | 400 #if defined(TOUCH_UI) |
401 | 401 |
402 // static | 402 // static |
403 TabContents* ActiveDownloadsUI::OpenPopup(Profile* profile) { | 403 TabContents* ActiveDownloadsUI::OpenPopup(Profile* profile) { |
404 Browser* browser = Browser::GetOrCreateTabbedBrowser(profile); | 404 Browser* browser = Browser::GetOrCreateTabbedBrowser(profile); |
405 OpenURLParams params(GURL(chrome::kChromeUIActiveDownloadsURL), GURL(), | 405 OpenURLParams params(GURL(chrome::kChromeUIActiveDownloadsURL), GURL(), |
406 SINGLETON_TAB, content::PAGE_TRANSITION_LINK); | 406 SINGLETON_TAB, content::PAGE_TRANSITION_LINK, false); |
407 TabContents* download_contents = browser->OpenURL(params); | 407 TabContents* download_contents = browser->OpenURL(params); |
408 browser->window()->Show(); | 408 browser->window()->Show(); |
409 return download_contents; | 409 return download_contents; |
410 } | 410 } |
411 | 411 |
412 TabContents* ActiveDownloadsUI::GetPopup(Browser** browser) { | 412 TabContents* ActiveDownloadsUI::GetPopup(Browser** browser) { |
413 for (TabContentsIterator it; !it.done(); ++it) { | 413 for (TabContentsIterator it; !it.done(); ++it) { |
414 TabContents* tab = it->tab_contents(); | 414 TabContents* tab = it->tab_contents(); |
415 const GURL& url = tab->GetURL(); | 415 const GURL& url = tab->GetURL(); |
416 if (url.SchemeIs(chrome::kChromeUIScheme) && | 416 if (url.SchemeIs(chrome::kChromeUIScheme) && |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 } | 469 } |
470 } | 470 } |
471 } | 471 } |
472 return NULL; | 472 return NULL; |
473 } | 473 } |
474 #endif // defined(TOUCH_UI) | 474 #endif // defined(TOUCH_UI) |
475 | 475 |
476 const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const { | 476 const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const { |
477 return handler_->downloads(); | 477 return handler_->downloads(); |
478 } | 478 } |
OLD | NEW |