OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1520 bool BrowserView::IsCommandIdEnabled(int command_id) const { | 1520 bool BrowserView::IsCommandIdEnabled(int command_id) const { |
1521 return browser_->command_updater()->IsCommandEnabled(command_id); | 1521 return browser_->command_updater()->IsCommandEnabled(command_id); |
1522 } | 1522 } |
1523 | 1523 |
1524 bool BrowserView::GetAcceleratorForCommandId(int command_id, | 1524 bool BrowserView::GetAcceleratorForCommandId(int command_id, |
1525 menus::Accelerator* accelerator) { | 1525 menus::Accelerator* accelerator) { |
1526 // Let's let the ToolbarView own the canonical implementation of this method. | 1526 // Let's let the ToolbarView own the canonical implementation of this method. |
1527 return toolbar_->GetAcceleratorForCommandId(command_id, accelerator); | 1527 return toolbar_->GetAcceleratorForCommandId(command_id, accelerator); |
1528 } | 1528 } |
1529 | 1529 |
1530 bool BrowserView::IsLabelForCommandIdDynamic(int command_id) const { | 1530 bool BrowserView::IsItemForCommandIdDynamic(int command_id) const { |
1531 return command_id == IDC_RESTORE_TAB; | 1531 return command_id == IDC_RESTORE_TAB; |
1532 } | 1532 } |
1533 | 1533 |
1534 string16 BrowserView::GetLabelForCommandId(int command_id) const { | 1534 string16 BrowserView::GetLabelForCommandId(int command_id) const { |
1535 DCHECK(command_id == IDC_RESTORE_TAB); | 1535 DCHECK(command_id == IDC_RESTORE_TAB); |
1536 | 1536 |
1537 int string_id = IDS_RESTORE_TAB; | 1537 int string_id = IDS_RESTORE_TAB; |
1538 if (IsCommandIdEnabled(command_id)) { | 1538 if (IsCommandIdEnabled(command_id)) { |
1539 TabRestoreService* trs = browser_->profile()->GetTabRestoreService(); | 1539 TabRestoreService* trs = browser_->profile()->GetTabRestoreService(); |
1540 if (trs && trs->entries().front()->type == TabRestoreService::WINDOW) | 1540 if (trs && trs->entries().front()->type == TabRestoreService::WINDOW) |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); | 2510 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); |
2511 | 2511 |
2512 return view; | 2512 return view; |
2513 } | 2513 } |
2514 #endif | 2514 #endif |
2515 | 2515 |
2516 // static | 2516 // static |
2517 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2517 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2518 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2518 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2519 } | 2519 } |
OLD | NEW |