OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/search_engines/template_url_table_model.h" | 5 #include "chrome/browser/search_engines/template_url_table_model.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
11 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
12 #include "app/table_model_observer.h" | 12 #include "app/table_model_observer.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
15 #include "base/stl_util-inl.h" | 15 #include "base/stl_util-inl.h" |
16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
17 #include "chrome/browser/favicon_service.h" | 17 #include "chrome/browser/favicon_service.h" |
18 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/search_engines/template_url.h" | 19 #include "chrome/browser/search_engines/template_url.h" |
20 #include "chrome/browser/search_engines/template_url_model.h" | 20 #include "chrome/browser/search_engines/template_url_model.h" |
21 #include "gfx/codec/png_codec.h" | 21 #include "gfx/codec/png_codec.h" |
22 #include "grit/app_resources.h" | 22 #include "grit/app_resources.h" |
23 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
24 #include "third_party/skia/include/core/SkBitmap.h" | 24 #include "third_party/skia/include/core/SkBitmap.h" |
25 | 25 |
26 // Group IDs used by TemplateURLTableModel. | 26 // Group IDs used by TemplateURLTableModel. |
27 static const int kMainGroupID = 0; | 27 static const int kMainGroupID = 0; |
28 static const int kOtherGroupID = 1; | 28 static const int kOtherGroupID = 1; |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 void TemplateURLTableModel::FavIconAvailable(ModelEntry* entry) { | 373 void TemplateURLTableModel::FavIconAvailable(ModelEntry* entry) { |
374 std::vector<ModelEntry*>::iterator i = | 374 std::vector<ModelEntry*>::iterator i = |
375 find(entries_.begin(), entries_.end(), entry); | 375 find(entries_.begin(), entries_.end(), entry); |
376 DCHECK(i != entries_.end()); | 376 DCHECK(i != entries_.end()); |
377 NotifyChanged(static_cast<int>(i - entries_.begin())); | 377 NotifyChanged(static_cast<int>(i - entries_.begin())); |
378 } | 378 } |
379 | 379 |
380 void TemplateURLTableModel::OnTemplateURLModelChanged() { | 380 void TemplateURLTableModel::OnTemplateURLModelChanged() { |
381 Reload(); | 381 Reload(); |
382 } | 382 } |
OLD | NEW |