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

Side by Side Diff: chrome/browser/extensions/api/app_runtime/app_runtime_api.cc

Issue 10869067: Deliver attach intent to packaged apps (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: r Created 8 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/platform_app_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/extensions/api/app_runtime/app_runtime_api.h" 5 #include "chrome/browser/extensions/api/app_runtime/app_runtime_api.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 case webkit_glue::WebIntentData::BLOB: 80 case webkit_glue::WebIntentData::BLOB:
81 intent_data = new DictionaryValue(); 81 intent_data = new DictionaryValue();
82 intent_data->SetString("format", "blob"); 82 intent_data->SetString("format", "blob");
83 intent_data->SetString("blobFileName", web_intent_data.blob_file.value()); 83 intent_data->SetString("blobFileName", web_intent_data.blob_file.value());
84 intent_data->SetString("blobLength", 84 intent_data->SetString("blobLength",
85 base::Int64ToString(web_intent_data.blob_length)); 85 base::Int64ToString(web_intent_data.blob_length));
86 // NOTE: This second argument is dropped before being dispatched to the 86 // NOTE: This second argument is dropped before being dispatched to the
87 // client code. 87 // client code.
88 args->Append(intent_data); 88 args->Append(intent_data);
89 break; 89 break;
90 case webkit_glue::WebIntentData::FILESYSTEM:
91 intent_data = new DictionaryValue();
92 intent_data->SetString("format", "filesystem");
93 intent_data->SetString("fileSystemId", web_intent_data.filesystem_id);
94 intent_data->SetString("baseName", web_intent_data.root_name);
benwells 2012/08/27 08:25:51 I don't understand why we need to send the base na
thorogood 2012/08/27 22:45:54 We also send it for fileEntry? The baseName is the
thorogood 2012/08/28 07:41:15 I've discussed this with Ben, and confirmed that d
95 args->Append(intent_data);
96 break;
90 default: 97 default:
91 NOTREACHED(); 98 NOTREACHED();
92 break; 99 break;
93 } 100 }
94 profile->GetExtensionEventRouter()->DispatchEventToExtension( 101 profile->GetExtensionEventRouter()->DispatchEventToExtension(
95 extension->id(), kOnLaunchedEvent, args.Pass(), NULL, GURL()); 102 extension->id(), kOnLaunchedEvent, args.Pass(), NULL, GURL());
96 } 103 }
97 104
98 } // namespace extensions 105 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/platform_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698