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/chromeos/file_manager/file_browser_handlers.h" | 5 #include "chrome/browser/chromeos/file_manager/file_browser_handlers.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 extensions::EventRouter* router = extensions::EventRouter::Get(profile_); | 380 extensions::EventRouter* router = extensions::EventRouter::Get(profile_); |
381 if (!router) { | 381 if (!router) { |
382 ExecuteDoneOnUIThread(false); | 382 ExecuteDoneOnUIThread(false); |
383 return; | 383 return; |
384 } | 384 } |
385 | 385 |
386 SetupHandlerHostFileAccessPermissions( | 386 SetupHandlerHostFileAccessPermissions( |
387 file_definition_list.get(), extension_.get(), handler_pid); | 387 file_definition_list.get(), extension_.get(), handler_pid); |
388 | 388 |
389 std::unique_ptr<base::ListValue> event_args(new base::ListValue()); | 389 std::unique_ptr<base::ListValue> event_args(new base::ListValue()); |
390 event_args->Append(new base::StringValue(action_id_)); | 390 event_args->AppendString(action_id_); |
391 base::DictionaryValue* details = new base::DictionaryValue(); | 391 base::DictionaryValue* details = new base::DictionaryValue(); |
392 event_args->Append(details); | 392 event_args->Append(details); |
393 // Get file definitions. These will be replaced with Entry instances by | 393 // Get file definitions. These will be replaced with Entry instances by |
394 // dispatchEvent() method from event_binding.js. | 394 // dispatchEvent() method from event_binding.js. |
395 base::ListValue* file_entries = new base::ListValue(); | 395 base::ListValue* file_entries = new base::ListValue(); |
396 details->Set("entries", file_entries); | 396 details->Set("entries", file_entries); |
397 | 397 |
398 for (EntryDefinitionList::const_iterator iter = | 398 for (EntryDefinitionList::const_iterator iter = |
399 entry_definition_list->begin(); | 399 entry_definition_list->begin(); |
400 iter != entry_definition_list->end(); | 400 iter != entry_definition_list->end(); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 if (common_handlers.empty()) | 528 if (common_handlers.empty()) |
529 return FileBrowserHandlerList(); | 529 return FileBrowserHandlerList(); |
530 } | 530 } |
531 } | 531 } |
532 | 532 |
533 return common_handlers; | 533 return common_handlers; |
534 } | 534 } |
535 | 535 |
536 } // namespace file_browser_handlers | 536 } // namespace file_browser_handlers |
537 } // namespace file_manager | 537 } // namespace file_manager |
OLD | NEW |