summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorgbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-28 20:46:07 +0000
committergbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-28 20:46:07 +0000
commit3ac1eef774ee13be784f4c2211f9909da27ad4dd (patch)
tree9fb9fbe03b789c5c82ffac568a71896d44c721be /content/browser
parent19425758a72d1048197e9138740f6301f3eff77d (diff)
downloadchromium_src-3ac1eef774ee13be784f4c2211f9909da27ad4dd.zip
chromium_src-3ac1eef774ee13be784f4c2211f9909da27ad4dd.tar.gz
chromium_src-3ac1eef774ee13be784f4c2211f9909da27ad4dd.tar.bz2
Pass intent data through to the picker and launch a new tab
on service selection. R=jhawkins@chromium.org BUG=None TEST=None Review URL: http://codereview.chromium.org/7978014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103171 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/intents/intent_injector.cc14
-rw-r--r--content/browser/intents/intent_injector.h6
2 files changed, 6 insertions, 14 deletions
diff --git a/content/browser/intents/intent_injector.cc b/content/browser/intents/intent_injector.cc
index 600baad..7c416d0 100644
--- a/content/browser/intents/intent_injector.cc
+++ b/content/browser/intents/intent_injector.cc
@@ -28,17 +28,11 @@ void IntentInjector::TabContentsDestroyed(TabContents* tab) {
}
void IntentInjector::SetIntent(int routing_id,
- int intent_id,
- const string16& action,
- const string16& type,
- const string16& data) {
- webkit_glue::WebIntentData* intent_data = new webkit_glue::WebIntentData;
- intent_data->action = action;
- intent_data->type = type;
- intent_data->data = data;
- source_intent_.reset(intent_data);
- intent_id_ = intent_id;
+ const webkit_glue::WebIntentData& intent,
+ int intent_id) {
source_routing_id_ = routing_id;
+ source_intent_.reset(new webkit_glue::WebIntentData(intent));
+ intent_id_ = intent_id;
SendIntent();
}
diff --git a/content/browser/intents/intent_injector.h b/content/browser/intents/intent_injector.h
index 0250060..f658446 100644
--- a/content/browser/intents/intent_injector.h
+++ b/content/browser/intents/intent_injector.h
@@ -43,10 +43,8 @@ class IntentInjector : public TabContentsObserver {
// Sets the intent data to be injected. Call after the user has selected a
// service to pass the intent data to that service.
void SetIntent(int routing_id,
- int intent_id,
- const string16& action,
- const string16& type,
- const string16& data);
+ const webkit_glue::WebIntentData& intent,
+ int intent_id);
private:
// Delivers the intent data to the renderer.