| OLD | NEW |
| 1 // Copyright (c) 2010 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/dom_ui/filebrowse_ui.h" | 5 #include "chrome/browser/dom_ui/filebrowse_ui.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // DownloadManager::Observer interface | 132 // DownloadManager::Observer interface |
| 133 virtual void ModelChanged(); | 133 virtual void ModelChanged(); |
| 134 | 134 |
| 135 // Callback for the "getRoots" message. | 135 // Callback for the "getRoots" message. |
| 136 void HandleGetRoots(const ListValue* args); | 136 void HandleGetRoots(const ListValue* args); |
| 137 | 137 |
| 138 void GetChildrenForPath(FilePath& path, bool is_refresh); | 138 void GetChildrenForPath(FilePath& path, bool is_refresh); |
| 139 | 139 |
| 140 void OnURLFetchComplete(const URLFetcher* source, | 140 void OnURLFetchComplete(const URLFetcher* source, |
| 141 const GURL& url, | 141 const GURL& url, |
| 142 const URLRequestStatus& status, | 142 const net::URLRequestStatus& status, |
| 143 int response_code, | 143 int response_code, |
| 144 const ResponseCookies& cookies, | 144 const ResponseCookies& cookies, |
| 145 const std::string& data); | 145 const std::string& data); |
| 146 | 146 |
| 147 // Callback for the "getChildren" message. | 147 // Callback for the "getChildren" message. |
| 148 void HandleGetChildren(const ListValue* args); | 148 void HandleGetChildren(const ListValue* args); |
| 149 // Callback for the "refreshDirectory" message. | 149 // Callback for the "refreshDirectory" message. |
| 150 void HandleRefreshDirectory(const ListValue* args); | 150 void HandleRefreshDirectory(const ListValue* args); |
| 151 void HandleIsAdvancedEnabled(const ListValue* args); | 151 void HandleIsAdvancedEnabled(const ListValue* args); |
| 152 | 152 |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 const std::string& path) { | 535 const std::string& path) { |
| 536 if (evt == chromeos::DISK_REMOVED || | 536 if (evt == chromeos::DISK_REMOVED || |
| 537 evt == chromeos::DISK_CHANGED) { | 537 evt == chromeos::DISK_CHANGED) { |
| 538 dom_ui_->CallJavascriptFunction(L"rootsChanged"); | 538 dom_ui_->CallJavascriptFunction(L"rootsChanged"); |
| 539 } | 539 } |
| 540 } | 540 } |
| 541 #endif | 541 #endif |
| 542 | 542 |
| 543 void FilebrowseHandler::OnURLFetchComplete(const URLFetcher* source, | 543 void FilebrowseHandler::OnURLFetchComplete(const URLFetcher* source, |
| 544 const GURL& url, | 544 const GURL& url, |
| 545 const URLRequestStatus& status, | 545 const net::URLRequestStatus& status, |
| 546 int response_code, | 546 int response_code, |
| 547 const ResponseCookies& cookies, | 547 const ResponseCookies& cookies, |
| 548 const std::string& data) { | 548 const std::string& data) { |
| 549 upload_response_code_ = response_code; | 549 upload_response_code_ = response_code; |
| 550 VLOG(1) << "Response code: " << response_code; | 550 VLOG(1) << "Response code: " << response_code; |
| 551 VLOG(1) << "Request url: " << url; | 551 VLOG(1) << "Request url: " << url; |
| 552 if (StartsWithASCII(url.spec(), kPicasawebUserPrefix, true)) { | 552 if (StartsWithASCII(url.spec(), kPicasawebUserPrefix, true)) { |
| 553 BrowserThread::PostTask( | 553 BrowserThread::PostTask( |
| 554 BrowserThread::UI, FROM_HERE, | 554 BrowserThread::UI, FROM_HERE, |
| 555 NewRunnableMethod(current_task_, &TaskProxy::FireUploadCompleteProxy)); | 555 NewRunnableMethod(current_task_, &TaskProxy::FireUploadCompleteProxy)); |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 } | 1204 } |
| 1205 } | 1205 } |
| 1206 | 1206 |
| 1207 return NULL; | 1207 return NULL; |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 const int FileBrowseUI::kPopupWidth = 250; | 1210 const int FileBrowseUI::kPopupWidth = 250; |
| 1211 const int FileBrowseUI::kPopupHeight = 300; | 1211 const int FileBrowseUI::kPopupHeight = 300; |
| 1212 const int FileBrowseUI::kSmallPopupWidth = 250; | 1212 const int FileBrowseUI::kSmallPopupWidth = 250; |
| 1213 const int FileBrowseUI::kSmallPopupHeight = 50; | 1213 const int FileBrowseUI::kSmallPopupHeight = 50; |
| OLD | NEW |