Chromium Code Reviews| Index: chrome/browser/intents/web_intent_service_data.h |
| diff --git a/chrome/browser/intents/web_intent_service_data.h b/chrome/browser/intents/web_intent_service_data.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..642e190bb7c89171b706b05fa73a9c8b2f124f2f |
| --- /dev/null |
| +++ b/chrome/browser/intents/web_intent_service_data.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_INTENTS_WEB_INTENT_SERVICE_DATA_H_ |
| +#define CHROME_BROWSER_INTENTS_WEB_INTENT_SERVICE_DATA_H_ |
| +#pragma once |
| + |
| +#include "base/string16.h" |
| +#include "googleurl/src/gurl.h" |
| +#include <iosfwd> |
| + |
| +// Describes the relevant elements of a WebIntent service. |
| +// TODO(gbillock): if we want to use this in an IPC message, it should |
|
groby-ooo-7-16
2011/09/16 23:49:49
Since we're also using it in browser/common, I'm w
groby-ooo-7-16
2011/09/20 17:55:07
I'm done wondering :) It definitely belongs into w
Greg Billock
2011/09/20 18:20:33
Agreed. Let's do that in a follow-on.
|
| +// go in webkit/glue in web_intent_data. |
| +struct WebIntentServiceData { |
| + // 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. |
| + }; |
| + |
| + WebIntentServiceData(); |
| + ~WebIntentServiceData(); |
| + |
| + bool operator==(const WebIntentServiceData& other) const; |
| + |
| + GURL service_url; // URL for service invocation. |
| + 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. |
| +std::ostream& operator<<(std::ostream& os, const WebIntentServiceData& intent); |
| + |
| +#endif // CHROME_BROWSER_INTENTS_WEB_INTENT_SERVICE_DATA_H_ |