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/cocoa/history_menu_bridge.h" | 5 #include "chrome/browser/ui/cocoa/history_menu_bridge.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/sys_string_conversions.h" | 12 #include "base/strings/sys_string_conversions.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "chrome/app/chrome_command_ids.h" // IDC_HISTORY_MENU | 15 #include "chrome/app/chrome_command_ids.h" // IDC_HISTORY_MENU |
16 #include "chrome/browser/favicon/favicon_service_factory.h" | 16 #include "chrome/browser/favicon/favicon_service_factory.h" |
17 #include "chrome/browser/history/history_service_factory.h" | 17 #include "chrome/browser/history/history_service_factory.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 19 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
20 #import "chrome/browser/ui/cocoa/history_menu_cocoa_controller.h" | 20 #import "chrome/browser/ui/cocoa/history_menu_cocoa_controller.h" |
21 #include "chrome/grit/generated_resources.h" | 21 #include "chrome/grit/generated_resources.h" |
22 #include "chrome/grit/theme_resources.h" | |
23 #include "components/grit/components_scaled_resources.h" | 22 #include "components/grit/components_scaled_resources.h" |
24 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
25 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
26 #include "ui/gfx/image/image.h" | 25 #include "ui/gfx/image/image.h" |
27 #include "ui/gfx/text_elider.h" | 26 #include "ui/gfx/text_elider.h" |
28 #include "ui/resources/grit/ui_resources.h" | 27 #include "ui/resources/grit/ui_resources.h" |
29 | 28 |
30 namespace { | 29 namespace { |
31 | 30 |
32 // Maximum number of pixels to use for a menu item title. | 31 // Maximum number of pixels to use for a menu item title. |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 const history::URLRows& deleted_rows, | 461 const history::URLRows& deleted_rows, |
463 const std::set<GURL>& favicon_urls) { | 462 const std::set<GURL>& favicon_urls) { |
464 OnHistoryChanged(); | 463 OnHistoryChanged(); |
465 } | 464 } |
466 | 465 |
467 void HistoryMenuBridge::OnHistoryServiceLoaded( | 466 void HistoryMenuBridge::OnHistoryServiceLoaded( |
468 history::HistoryService* history_service) { | 467 history::HistoryService* history_service) { |
469 history_service_ = history_service; | 468 history_service_ = history_service; |
470 Init(); | 469 Init(); |
471 } | 470 } |
OLD | NEW |