| 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/webui/history_ui.h" | 5 #include "chrome/browser/ui/webui/history_ui.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 // Maximum number of search results to return in a given search. We should | 52 // Maximum number of search results to return in a given search. We should |
| 53 // eventually remove this. | 53 // eventually remove this. |
| 54 static const int kMaxSearchResults = 100; | 54 static const int kMaxSearchResults = 100; |
| 55 static const char kStringsJsFile[] = "strings.js"; | 55 static const char kStringsJsFile[] = "strings.js"; |
| 56 static const char kHistoryJsFile[] = "history.js"; | 56 static const char kHistoryJsFile[] = "history.js"; |
| 57 | 57 |
| 58 namespace { | 58 namespace { |
| 59 | 59 |
| 60 #if defined(OS_MACOSX) | 60 #if defined(OS_MACOSX) |
| 61 // U+0028 U+21E7 U+2318 U+004E U+0029 in UTF8 | 61 const char kIncognitoModeShortcut[] = "(" |
| 62 const char kIncognitoModeShortcut[] = "\x28\xE2\x8c\xA5\xE2\x8C\x98\x4E\x29"; | 62 "\xE2\x87\xA7" // Shift symbol (U+21E7 'UPWARDS WHITE ARROW'). |
| 63 "\xE2\x8C\x98" // Command symbol (U+2318 'PLACE OF INTEREST SIGN'). |
| 64 "N)"; |
| 63 #elif defined(OS_WIN) | 65 #elif defined(OS_WIN) |
| 64 const char kIncognitoModeShortcut[] = "(Ctrl+Shift+N)"; | 66 const char kIncognitoModeShortcut[] = "(Ctrl+Shift+N)"; |
| 65 #else | 67 #else |
| 66 const char kIncognitoModeShortcut[] = "(Shift+Ctrl+N)"; | 68 const char kIncognitoModeShortcut[] = "(Shift+Ctrl+N)"; |
| 67 #endif | 69 #endif |
| 68 | 70 |
| 69 }; // namespace | 71 }; // namespace |
| 70 | 72 |
| 71 //////////////////////////////////////////////////////////////////////////////// | 73 //////////////////////////////////////////////////////////////////////////////// |
| 72 // | 74 // |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 const GURL HistoryUI::GetHistoryURLWithSearchText(const string16& text) { | 480 const GURL HistoryUI::GetHistoryURLWithSearchText(const string16& text) { |
| 479 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + | 481 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + |
| 480 net::EscapeQueryParamValue(UTF16ToUTF8(text), true)); | 482 net::EscapeQueryParamValue(UTF16ToUTF8(text), true)); |
| 481 } | 483 } |
| 482 | 484 |
| 483 // static | 485 // static |
| 484 RefCountedMemory* HistoryUI::GetFaviconResourceBytes() { | 486 RefCountedMemory* HistoryUI::GetFaviconResourceBytes() { |
| 485 return ResourceBundle::GetSharedInstance(). | 487 return ResourceBundle::GetSharedInstance(). |
| 486 LoadDataResourceBytes(IDR_HISTORY_FAVICON); | 488 LoadDataResourceBytes(IDR_HISTORY_FAVICON); |
| 487 } | 489 } |
| OLD | NEW |