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/extensions/file_handler_util.h" | 5 #include "chrome/browser/chromeos/extensions/file_handler_util.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 Browser* current_browser = browser(); | 550 Browser* current_browser = browser(); |
551 if (current_browser) { | 551 if (current_browser) { |
552 WebContents* contents = current_browser->GetSelectedWebContents(); | 552 WebContents* contents = current_browser->GetSelectedWebContents(); |
553 if (contents) | 553 if (contents) |
554 details->SetInteger("tab_id", ExtensionTabUtil::GetTabId(contents)); | 554 details->SetInteger("tab_id", ExtensionTabUtil::GetTabId(contents)); |
555 } | 555 } |
556 | 556 |
557 UpdateFileHandlerUsageStats(profile_, MakeTaskID(extension_id_, action_id_)); | 557 UpdateFileHandlerUsageStats(profile_, MakeTaskID(extension_id_, action_id_)); |
558 | 558 |
559 std::string json_args; | 559 std::string json_args; |
560 base::JSONWriter::Write(event_args.get(), false, &json_args); | 560 base::JSONWriter::Write(event_args.get(), &json_args); |
561 event_router->DispatchEventToExtension( | 561 event_router->DispatchEventToExtension( |
562 extension_id_, std::string("fileBrowserHandler.onExecute"), | 562 extension_id_, std::string("fileBrowserHandler.onExecute"), |
563 json_args, profile_, | 563 json_args, profile_, |
564 GURL()); | 564 GURL()); |
565 Done(true); | 565 Done(true); |
566 } | 566 } |
567 | 567 |
568 } // namespace file_handler_util | 568 } // namespace file_handler_util |
569 | 569 |
OLD | NEW |