summaryrefslogtreecommitdiffstats
path: root/chrome/browser/intents
diff options
context:
space:
mode:
authorgroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 20:30:35 +0000
committergroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 20:30:35 +0000
commit17176ace61dcfe1e5abc58dd03adeb0837ce36e1 (patch)
treeab647813d5a63af4392926d3d1b552308588a864 /chrome/browser/intents
parent0c8908eb387489bb04391991298021a22337b240 (diff)
downloadchromium_src-17176ace61dcfe1e5abc58dd03adeb0837ce36e1.zip
chromium_src-17176ace61dcfe1e5abc58dd03adeb0837ce36e1.tar.gz
chromium_src-17176ace61dcfe1e5abc58dd03adeb0837ce36e1.tar.bz2
Add disposition field to intents web data.
BUG=none TEST=WebIntentsTableTest.* Review URL: http://codereview.chromium.org/7890022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101369 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/intents')
-rw-r--r--chrome/browser/intents/web_intent_data.cc8
-rw-r--r--chrome/browser/intents/web_intent_data.h7
2 files changed, 13 insertions, 2 deletions
diff --git a/chrome/browser/intents/web_intent_data.cc b/chrome/browser/intents/web_intent_data.cc
index c3ae57d..5f7b772 100644
--- a/chrome/browser/intents/web_intent_data.cc
+++ b/chrome/browser/intents/web_intent_data.cc
@@ -6,7 +6,9 @@
#include "chrome/browser/intents/web_intent_data.h"
#include <ostream>
-WebIntentData::WebIntentData() {}
+WebIntentData::WebIntentData()
+ : disposition(WebIntentData::DISPOSITION_WINDOW) {
+}
WebIntentData::~WebIntentData() {}
@@ -14,7 +16,8 @@ bool WebIntentData::operator==(const WebIntentData& other) const {
return (service_url == other.service_url &&
action == other.action &&
type == other.type &&
- title == other.title);
+ title == other.title &&
+ disposition == other.disposition);
}
std::ostream& operator<<(::std::ostream& os,
@@ -24,5 +27,6 @@ std::ostream& operator<<(::std::ostream& os,
", " << UTF16ToUTF8(intent.action) <<
", " << UTF16ToUTF8(intent.type) <<
", " << UTF16ToUTF8(intent.title) <<
+ ", " << intent.disposition <<
"}";
}
diff --git a/chrome/browser/intents/web_intent_data.h b/chrome/browser/intents/web_intent_data.h
index 6792149..6c0babe 100644
--- a/chrome/browser/intents/web_intent_data.h
+++ b/chrome/browser/intents/web_intent_data.h
@@ -12,6 +12,12 @@
// Describes the relevant elements of a WebIntent.
struct WebIntentData {
+ // An intents disposition determines which context the service is opened in.
+ enum Disposition {
+ DISPOSITION_WINDOW, // Open service inside a new window. (Default)
+ DISPOSITION_INLINE, // Open service inside the picker UI window.
+ };
+
WebIntentData();
~WebIntentData();
@@ -21,6 +27,7 @@ struct WebIntentData {
string16 action; // Name of action provided by service.
string16 type; // MIME type of data accepted by service.
string16 title; // The title of the service.
+ Disposition disposition; // The context the service is opened in.
};
// Printing operator - helps gtest produce readable error messages.