| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 gfx::Image icon; | 67 gfx::Image icon; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 WebIntentPickerModel(); | 70 WebIntentPickerModel(); |
| 71 ~WebIntentPickerModel(); | 71 ~WebIntentPickerModel(); |
| 72 | 72 |
| 73 void set_observer(WebIntentPickerModelObserver* observer) { | 73 void set_observer(WebIntentPickerModelObserver* observer) { |
| 74 observer_ = observer; | 74 observer_ = observer; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void set_action(const string16& action) { action_ = action; } | |
| 78 | |
| 79 const string16& action() { return action_; } | |
| 80 | |
| 81 void set_mimetype(const string16& mimetype) { mimetype_ = mimetype; } | |
| 82 | |
| 83 const string16& mimetype() { return mimetype_; } | |
| 84 | |
| 85 // Add a new installed service with |title|, |url| and |disposition| to the | 77 // Add a new installed service with |title|, |url| and |disposition| to the |
| 86 // picker. | 78 // picker. |
| 87 void AddInstalledService(const string16& title, | 79 void AddInstalledService(const string16& title, |
| 88 const GURL& url, | 80 const GURL& url, |
| 89 Disposition disposition); | 81 Disposition disposition); |
| 90 | 82 |
| 91 // Remove an installed service from the picker at |index|. | 83 // Remove an installed service from the picker at |index|. |
| 92 void RemoveInstalledServiceAt(size_t index); | 84 void RemoveInstalledServiceAt(size_t index); |
| 93 | 85 |
| 94 // Remove all installed services from the picker, and resets to not | 86 // Remove all installed services from the picker, and resets to not |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // by this model. | 139 // by this model. |
| 148 std::vector<SuggestedExtension*> suggested_extensions_; | 140 std::vector<SuggestedExtension*> suggested_extensions_; |
| 149 | 141 |
| 150 // The observer to send notifications to, or NULL if none. | 142 // The observer to send notifications to, or NULL if none. |
| 151 WebIntentPickerModelObserver* observer_; | 143 WebIntentPickerModelObserver* observer_; |
| 152 | 144 |
| 153 // The url of the intent service that is being displayed inline, or | 145 // The url of the intent service that is being displayed inline, or |
| 154 // GURL::EmptyGURL() if none. | 146 // GURL::EmptyGURL() if none. |
| 155 GURL inline_disposition_url_; | 147 GURL inline_disposition_url_; |
| 156 | 148 |
| 157 // A cached copy of the action that instantiated the picker. | |
| 158 string16 action_; | |
| 159 | |
| 160 // A cached copy of the mimetype that instantiated the picker. | |
| 161 string16 mimetype_; | |
| 162 | |
| 163 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerModel); | 149 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerModel); |
| 164 }; | 150 }; |
| 165 | 151 |
| 166 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ | 152 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ |
| OLD | NEW |