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 #import "chrome/browser/ui/cocoa/history_menu_cocoa_controller.h" | 5 #import "chrome/browser/ui/cocoa/history_menu_cocoa_controller.h" |
6 | 6 |
7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
8 #include "chrome/app/chrome_command_ids.h" // IDC_HISTORY_MENU | 8 #include "chrome/app/chrome_command_ids.h" // IDC_HISTORY_MENU |
9 #import "chrome/browser/app_controller_mac.h" | 9 #import "chrome/browser/app_controller_mac.h" |
10 #include "chrome/browser/history/history.h" | 10 #include "chrome/browser/history/history.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // If this item can be restored using TabRestoreService, do so. Otherwise, | 41 // If this item can be restored using TabRestoreService, do so. Otherwise, |
42 // just load the URL. | 42 // just load the URL. |
43 TabRestoreService* service = | 43 TabRestoreService* service = |
44 TabRestoreServiceFactory::GetForProfile(bridge_->profile()); | 44 TabRestoreServiceFactory::GetForProfile(bridge_->profile()); |
45 if (node->session_id && service) { | 45 if (node->session_id && service) { |
46 service->RestoreEntryById(browser->tab_restore_service_delegate(), | 46 service->RestoreEntryById(browser->tab_restore_service_delegate(), |
47 node->session_id, false); | 47 node->session_id, false); |
48 } else { | 48 } else { |
49 DCHECK(node->url.is_valid()); | 49 DCHECK(node->url.is_valid()); |
50 browser->OpenURL(node->url, GURL(), disposition, | 50 browser->OpenURL(node->url, GURL(), disposition, |
51 PageTransition::AUTO_BOOKMARK); | 51 content::PAGE_TRANSITION_AUTO_BOOKMARK); |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 - (IBAction)openHistoryMenuItem:(id)sender { | 55 - (IBAction)openHistoryMenuItem:(id)sender { |
56 const HistoryMenuBridge::HistoryItem* item = | 56 const HistoryMenuBridge::HistoryItem* item = |
57 bridge_->HistoryItemForMenuItem(sender); | 57 bridge_->HistoryItemForMenuItem(sender); |
58 [self openURLForItem:item]; | 58 [self openURLForItem:item]; |
59 } | 59 } |
60 | 60 |
61 @end // HistoryMenuCocoaController | 61 @end // HistoryMenuCocoaController |
OLD | NEW |