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 #include "chrome/browser/ui/intents/web_intent_picker_model.h" | 5 #include "chrome/browser/ui/intents/web_intent_picker_model.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 InstalledService* service = installed_services_[index]; | 49 InstalledService* service = installed_services_[index]; |
50 installed_services_.erase(installed_services_.begin() + index); | 50 installed_services_.erase(installed_services_.begin() + index); |
51 delete service; | 51 delete service; |
52 if (observer_) | 52 if (observer_) |
53 observer_->OnModelChanged(this); | 53 observer_->OnModelChanged(this); |
54 } | 54 } |
55 | 55 |
56 void WebIntentPickerModel::Clear() { | 56 void WebIntentPickerModel::Clear() { |
57 DestroyAll(); | 57 DestroyAll(); |
58 action_.clear(); | 58 action_.clear(); |
59 mimetype_.clear(); | 59 type_.clear(); |
60 inline_disposition_url_ = GURL::EmptyGURL(); | 60 inline_disposition_url_ = GURL::EmptyGURL(); |
61 if (observer_) | 61 if (observer_) |
62 observer_->OnModelChanged(this); | 62 observer_->OnModelChanged(this); |
63 } | 63 } |
64 | 64 |
65 const WebIntentPickerModel::InstalledService& | 65 const WebIntentPickerModel::InstalledService& |
66 WebIntentPickerModel::GetInstalledServiceAt(size_t index) const { | 66 WebIntentPickerModel::GetInstalledServiceAt(size_t index) const { |
67 DCHECK_LT(index, installed_services_.size()); | 67 DCHECK_LT(index, installed_services_.size()); |
68 return *installed_services_[index]; | 68 return *installed_services_[index]; |
69 } | 69 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 double average_rating) | 180 double average_rating) |
181 : title(title), | 181 : title(title), |
182 id(id), | 182 id(id), |
183 average_rating(average_rating), | 183 average_rating(average_rating), |
184 icon(ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 184 icon(ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
185 IDR_DEFAULT_FAVICON)) { | 185 IDR_DEFAULT_FAVICON)) { |
186 } | 186 } |
187 | 187 |
188 WebIntentPickerModel::SuggestedExtension::~SuggestedExtension() { | 188 WebIntentPickerModel::SuggestedExtension::~SuggestedExtension() { |
189 } | 189 } |
OLD | NEW |