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

Side by Side Diff: chrome/browser/chromeos/extensions/file_handler_util.cc

Issue 10532056: TabContentsWrapper -> TabContents, part 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small Created 8 years, 6 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) 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 DictionaryValue* file_def = new DictionaryValue(); 623 DictionaryValue* file_def = new DictionaryValue();
624 files_urls->Append(file_def); 624 files_urls->Append(file_def);
625 file_def->SetString("fileSystemName", file_system_name); 625 file_def->SetString("fileSystemName", file_system_name);
626 file_def->SetString("fileSystemRoot", file_system_root.spec()); 626 file_def->SetString("fileSystemRoot", file_system_root.spec());
627 file_def->SetString("fileFullPath", iter->virtual_path.value()); 627 file_def->SetString("fileFullPath", iter->virtual_path.value());
628 file_def->SetBoolean("fileIsDirectory", iter->is_directory); 628 file_def->SetBoolean("fileIsDirectory", iter->is_directory);
629 } 629 }
630 // Get tab id. 630 // Get tab id.
631 Browser* current_browser = browser(); 631 Browser* current_browser = browser();
632 if (current_browser) { 632 if (current_browser) {
633 WebContents* contents = current_browser->GetSelectedWebContents(); 633 WebContents* contents = current_browser->GetActiveWebContents();
634 if (contents) 634 if (contents)
635 details->SetInteger("tab_id", ExtensionTabUtil::GetTabId(contents)); 635 details->SetInteger("tab_id", ExtensionTabUtil::GetTabId(contents));
636 } 636 }
637 637
638 std::string json_args; 638 std::string json_args;
639 base::JSONWriter::Write(event_args.get(), &json_args); 639 base::JSONWriter::Write(event_args.get(), &json_args);
640 event_router->DispatchEventToExtension( 640 event_router->DispatchEventToExtension(
641 extension_id_, std::string("fileBrowserHandler.onExecute"), 641 extension_id_, std::string("fileBrowserHandler.onExecute"),
642 json_args, profile_, 642 json_args, profile_,
643 GURL()); 643 GURL());
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 handler_host_permissions_[i].first, 677 handler_host_permissions_[i].first,
678 handler_host_permissions_[i].second); 678 handler_host_permissions_[i].second);
679 } 679 }
680 680
681 // We don't need this anymore. 681 // We don't need this anymore.
682 handler_host_permissions_.clear(); 682 handler_host_permissions_.clear();
683 } 683 }
684 684
685 } // namespace file_handler_util 685 } // namespace file_handler_util
686 686
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698