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

Side by Side Diff: chrome/browser/ui/webui/active_downloads_ui.cc

Issue 9015022: Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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) 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 browser->window()->Show(); 407 browser->window()->Show();
408 return browser; 408 return browser;
409 } 409 }
410 410
411 // static 411 // static
412 Browser* ActiveDownloadsUI::GetPopup() { 412 Browser* ActiveDownloadsUI::GetPopup() {
413 for (BrowserList::const_iterator it = BrowserList::begin(); 413 for (BrowserList::const_iterator it = BrowserList::begin();
414 it != BrowserList::end(); 414 it != BrowserList::end();
415 ++it) { 415 ++it) {
416 if ((*it)->is_type_panel() && (*it)->is_app()) { 416 if ((*it)->is_type_panel() && (*it)->is_app()) {
417 WebContents* web_contents = 417 WebContents* web_contents = (*it)->GetSelectedWebContents();
418 (*it)->GetSelectedTabContentsWrapper()->web_contents();
419 DCHECK(web_contents); 418 DCHECK(web_contents);
420 if (!web_contents) 419 if (!web_contents)
421 continue; 420 continue;
422 const GURL& url = web_contents->GetURL(); 421 const GURL& url = web_contents->GetURL();
423 422
424 if (url.SchemeIs(chrome::kChromeUIScheme) && 423 if (url.SchemeIs(chrome::kChromeUIScheme) &&
425 url.host() == chrome::kChromeUIActiveDownloadsHost) { 424 url.host() == chrome::kChromeUIActiveDownloadsHost) {
426 return (*it); 425 return (*it);
427 } 426 }
428 } 427 }
429 } 428 }
430 return NULL; 429 return NULL;
431 } 430 }
432 431
433 const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const { 432 const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const {
434 return handler_->downloads(); 433 return handler_->downloads();
435 } 434 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/wrench_menu.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698