OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/webui/history2_ui.h" | 5 #include "chrome/browser/ui/webui/history2_ui.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" | 26 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" |
27 #include "chrome/browser/ui/webui/favicon_source.h" | 27 #include "chrome/browser/ui/webui/favicon_source.h" |
28 #include "chrome/common/chrome_notification_types.h" | 28 #include "chrome/common/chrome_notification_types.h" |
29 #include "chrome/common/jstemplate_builder.h" | 29 #include "chrome/common/jstemplate_builder.h" |
30 #include "chrome/common/time_format.h" | 30 #include "chrome/common/time_format.h" |
31 #include "chrome/common/url_constants.h" | 31 #include "chrome/common/url_constants.h" |
32 #include "content/browser/browser_thread.h" | 32 #include "content/browser/browser_thread.h" |
33 #include "content/browser/tab_contents/tab_contents.h" | 33 #include "content/browser/tab_contents/tab_contents.h" |
34 #include "content/browser/tab_contents/tab_contents_delegate.h" | 34 #include "content/browser/tab_contents/tab_contents_delegate.h" |
35 #include "content/browser/user_metrics.h" | 35 #include "content/browser/user_metrics.h" |
| 36 #include "content/common/notification_details.h" |
36 #include "content/common/notification_source.h" | 37 #include "content/common/notification_source.h" |
37 #include "content/common/notification_details.h" | |
38 #include "grit/browser_resources.h" | 38 #include "grit/browser_resources.h" |
39 #include "grit/chromium_strings.h" | 39 #include "grit/chromium_strings.h" |
40 #include "grit/generated_resources.h" | 40 #include "grit/generated_resources.h" |
41 #include "grit/locale_settings.h" | 41 #include "grit/locale_settings.h" |
42 #include "grit/theme_resources.h" | 42 #include "grit/theme_resources.h" |
43 #include "grit/theme_resources_standard.h" | 43 #include "grit/theme_resources_standard.h" |
44 #include "net/base/escape.h" | 44 #include "net/base/escape.h" |
45 #include "ui/base/l10n/l10n_util.h" | 45 #include "ui/base/l10n/l10n_util.h" |
46 #include "ui/base/resource/resource_bundle.h" | 46 #include "ui/base/resource/resource_bundle.h" |
47 | 47 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 | 381 |
382 // Set up the chrome://history2/ source. | 382 // Set up the chrome://history2/ source. |
383 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); | 383 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); |
384 profile->GetChromeURLDataManager()->AddDataSource( | 384 profile->GetChromeURLDataManager()->AddDataSource( |
385 CreateHistory2UIHTMLSource()); | 385 CreateHistory2UIHTMLSource()); |
386 } | 386 } |
387 | 387 |
388 // static | 388 // static |
389 const GURL HistoryUI2::GetHistoryURLWithSearchText(const string16& text) { | 389 const GURL HistoryUI2::GetHistoryURLWithSearchText(const string16& text) { |
390 return GURL(std::string(chrome::kChromeUIHistory2URL) + "#q=" + | 390 return GURL(std::string(chrome::kChromeUIHistory2URL) + "#q=" + |
391 EscapeQueryParamValue(UTF16ToUTF8(text), true)); | 391 net::EscapeQueryParamValue(UTF16ToUTF8(text), true)); |
392 } | 392 } |
393 | 393 |
394 // static | 394 // static |
395 RefCountedMemory* HistoryUI2::GetFaviconResourceBytes() { | 395 RefCountedMemory* HistoryUI2::GetFaviconResourceBytes() { |
396 return ResourceBundle::GetSharedInstance(). | 396 return ResourceBundle::GetSharedInstance(). |
397 LoadDataResourceBytes(IDR_HISTORY_FAVICON); | 397 LoadDataResourceBytes(IDR_HISTORY_FAVICON); |
398 } | 398 } |
OLD | NEW |