| 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 #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_service.h" | 10 #include "chrome/browser/history/history_service.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 chrome::HOST_DESKTOP_TYPE_NATIVE); | 49 chrome::HOST_DESKTOP_TYPE_NATIVE); |
| 50 BrowserTabRestoreServiceDelegate* delegate = browser ? | 50 BrowserTabRestoreServiceDelegate* delegate = browser ? |
| 51 browser->tab_restore_service_delegate() : NULL; | 51 browser->tab_restore_service_delegate() : NULL; |
| 52 service->RestoreEntryById(delegate, node->session_id, | 52 service->RestoreEntryById(delegate, node->session_id, |
| 53 chrome::HOST_DESKTOP_TYPE_NATIVE, UNKNOWN); | 53 chrome::HOST_DESKTOP_TYPE_NATIVE, UNKNOWN); |
| 54 } else { | 54 } else { |
| 55 DCHECK(node->url.is_valid()); | 55 DCHECK(node->url.is_valid()); |
| 56 WindowOpenDisposition disposition = | 56 WindowOpenDisposition disposition = |
| 57 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); | 57 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); |
| 58 chrome::NavigateParams params(bridge_->profile(), node->url, | 58 chrome::NavigateParams params(bridge_->profile(), node->url, |
| 59 content::PAGE_TRANSITION_AUTO_BOOKMARK); | 59 ui::PAGE_TRANSITION_AUTO_BOOKMARK); |
| 60 params.disposition = disposition; | 60 params.disposition = disposition; |
| 61 chrome::Navigate(¶ms); | 61 chrome::Navigate(¶ms); |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 - (IBAction)openHistoryMenuItem:(id)sender { | 65 - (IBAction)openHistoryMenuItem:(id)sender { |
| 66 const HistoryMenuBridge::HistoryItem* item = | 66 const HistoryMenuBridge::HistoryItem* item = |
| 67 bridge_->HistoryItemForMenuItem(sender); | 67 bridge_->HistoryItemForMenuItem(sender); |
| 68 [self openURLForItem:item]; | 68 [self openURLForItem:item]; |
| 69 } | 69 } |
| 70 | 70 |
| 71 @end // HistoryMenuCocoaController | 71 @end // HistoryMenuCocoaController |
| OLD | NEW |