| 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/chromeos/imageburner_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/imageburner_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 } | 606 } |
| 607 | 607 |
| 608 void ImageBurnResourceManager::ModelChanged() { | 608 void ImageBurnResourceManager::ModelChanged() { |
| 609 std::vector<DownloadItem*> downloads; | 609 std::vector<DownloadItem*> downloads; |
| 610 download_manager_->GetTemporaryDownloads(GetImageDir(), &downloads); | 610 download_manager_->GetTemporaryDownloads(GetImageDir(), &downloads); |
| 611 if (download_item_observer_added_) | 611 if (download_item_observer_added_) |
| 612 return; | 612 return; |
| 613 for (std::vector<DownloadItem*>::const_iterator it = downloads.begin(); | 613 for (std::vector<DownloadItem*>::const_iterator it = downloads.begin(); |
| 614 it != downloads.end(); | 614 it != downloads.end(); |
| 615 ++it) { | 615 ++it) { |
| 616 if ((*it)->url() == config_file_url_) { | 616 if ((*it)->GetURL() == config_file_url_) { |
| 617 download_item_observer_added_ = true; | 617 download_item_observer_added_ = true; |
| 618 (*it)->AddObserver(this); | 618 (*it)->AddObserver(this); |
| 619 active_download_item_ = *it; | 619 active_download_item_ = *it; |
| 620 break; | 620 break; |
| 621 } | 621 } |
| 622 } | 622 } |
| 623 } | 623 } |
| 624 | 624 |
| 625 void ImageBurnResourceManager::OnDownloadStarted(bool success) { | 625 void ImageBurnResourceManager::OnDownloadStarted(bool success) { |
| 626 if (!success) | 626 if (!success) |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 // | 814 // |
| 815 // ImageBurnUI | 815 // ImageBurnUI |
| 816 // | 816 // |
| 817 //////////////////////////////////////////////////////////////////////////////// | 817 //////////////////////////////////////////////////////////////////////////////// |
| 818 ImageBurnUI::ImageBurnUI(TabContents* contents) : WebUI(contents) { | 818 ImageBurnUI::ImageBurnUI(TabContents* contents) : WebUI(contents) { |
| 819 ImageBurnHandler* handler = new ImageBurnHandler(contents); | 819 ImageBurnHandler* handler = new ImageBurnHandler(contents); |
| 820 AddMessageHandler((handler)->Attach(this)); | 820 AddMessageHandler((handler)->Attach(this)); |
| 821 ImageBurnUIHTMLSource* html_source = new ImageBurnUIHTMLSource(); | 821 ImageBurnUIHTMLSource* html_source = new ImageBurnUIHTMLSource(); |
| 822 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); | 822 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
| 823 } | 823 } |
| OLD | NEW |