| 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 "chrome/app/chrome_command_ids.h" // IDC_HISTORY_MENU | 14 #include "chrome/app/chrome_command_ids.h" // IDC_HISTORY_MENU |
| 15 #include "chrome/browser/favicon/favicon_service_factory.h" | 15 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 16 #include "chrome/browser/history/history_service_factory.h" | 16 #include "chrome/browser/history/history_service_factory.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 18 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 19 #import "chrome/browser/ui/cocoa/history_menu_cocoa_controller.h" | 19 #import "chrome/browser/ui/cocoa/history_menu_cocoa_controller.h" |
| 20 #include "chrome/grit/generated_resources.h" | 20 #include "chrome/grit/generated_resources.h" |
| 21 #include "grit/components_scaled_resources.h" | |
| 22 #include "grit/theme_resources.h" | 21 #include "grit/theme_resources.h" |
| 23 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 24 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
| 25 #include "ui/gfx/image/image.h" | 24 #include "ui/gfx/image/image.h" |
| 26 #include "ui/gfx/text_elider.h" | 25 #include "ui/gfx/text_elider.h" |
| 27 #include "ui/resources/grit/ui_resources.h" | 26 #include "ui/resources/grit/ui_resources.h" |
| 28 | 27 |
| 29 namespace { | 28 namespace { |
| 30 | 29 |
| 31 // Maximum number of pixels to use for a menu item title. | 30 // Maximum number of pixels to use for a menu item title. |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 const history::URLRows& deleted_rows, | 453 const history::URLRows& deleted_rows, |
| 455 const std::set<GURL>& favicon_urls) { | 454 const std::set<GURL>& favicon_urls) { |
| 456 OnHistoryChanged(); | 455 OnHistoryChanged(); |
| 457 } | 456 } |
| 458 | 457 |
| 459 void HistoryMenuBridge::OnHistoryServiceLoaded( | 458 void HistoryMenuBridge::OnHistoryServiceLoaded( |
| 460 history::HistoryService* history_service) { | 459 history::HistoryService* history_service) { |
| 461 history_service_ = history_service; | 460 history_service_ = history_service; |
| 462 Init(); | 461 Init(); |
| 463 } | 462 } |
| OLD | NEW |