OLD | NEW |
---|---|
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 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ |
6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ | 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 } | 76 } |
77 | 77 |
78 void set_action(const string16& action) { action_ = action; } | 78 void set_action(const string16& action) { action_ = action; } |
79 | 79 |
80 const string16& action() { return action_; } | 80 const string16& action() { return action_; } |
81 | 81 |
82 void set_mimetype(const string16& mimetype) { mimetype_ = mimetype; } | 82 void set_mimetype(const string16& mimetype) { mimetype_ = mimetype; } |
83 | 83 |
84 const string16& mimetype() { return mimetype_; } | 84 const string16& mimetype() { return mimetype_; } |
85 | 85 |
86 void set_default_service_url(const std::string& default_url) { | |
87 default_service_url_ = default_url; | |
groby-ooo-7-16
2012/05/01 15:28:33
See previous comment on keeping an InstalledServic
| |
88 } | |
89 | |
90 const std::string& default_service_url() { return default_service_url_; } | |
91 | |
86 // Add a new installed service with |title|, |url| and |disposition| to the | 92 // Add a new installed service with |title|, |url| and |disposition| to the |
87 // picker. | 93 // picker. |
88 void AddInstalledService(const string16& title, | 94 void AddInstalledService(const string16& title, |
89 const GURL& url, | 95 const GURL& url, |
90 Disposition disposition); | 96 Disposition disposition); |
91 | 97 |
92 // Remove an installed service from the picker at |index|. | 98 // Remove an installed service from the picker at |index|. |
93 void RemoveInstalledServiceAt(size_t index); | 99 void RemoveInstalledServiceAt(size_t index); |
94 | 100 |
95 // Remove all installed services from the picker, and resets to not | 101 // Remove all installed services from the picker, and resets to not |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 // The url of the intent service that is being displayed inline, or | 163 // The url of the intent service that is being displayed inline, or |
158 // GURL::EmptyGURL() if none. | 164 // GURL::EmptyGURL() if none. |
159 GURL inline_disposition_url_; | 165 GURL inline_disposition_url_; |
160 | 166 |
161 // A cached copy of the action that instantiated the picker. | 167 // A cached copy of the action that instantiated the picker. |
162 string16 action_; | 168 string16 action_; |
163 | 169 |
164 // A cached copy of the mimetype that instantiated the picker. | 170 // A cached copy of the mimetype that instantiated the picker. |
165 string16 mimetype_; | 171 string16 mimetype_; |
166 | 172 |
173 // The non-empty url of the default service if the WebIntentsRegistry | |
174 // finds a default service matching the intent being dispatched. | |
175 std::string default_service_url_; | |
groby-ooo-7-16
2012/05/01 15:28:33
If it's an URL, shouldn't it be a GURL, not std::s
Greg Billock
2012/05/01 19:17:54
Done.
| |
176 | |
167 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerModel); | 177 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerModel); |
168 }; | 178 }; |
169 | 179 |
170 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ | 180 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ |
OLD | NEW |