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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 bool BrowserView::IsCommandIdEnabled(int command_id) const { | 1518 bool BrowserView::IsCommandIdEnabled(int command_id) const { |
1519 return browser_->command_updater()->IsCommandEnabled(command_id); | 1519 return browser_->command_updater()->IsCommandEnabled(command_id); |
1520 } | 1520 } |
1521 | 1521 |
1522 bool BrowserView::GetAcceleratorForCommandId(int command_id, | 1522 bool BrowserView::GetAcceleratorForCommandId(int command_id, |
1523 menus::Accelerator* accelerator) { | 1523 menus::Accelerator* accelerator) { |
1524 // Let's let the ToolbarView own the canonical implementation of this method. | 1524 // Let's let the ToolbarView own the canonical implementation of this method. |
1525 return toolbar_->GetAcceleratorForCommandId(command_id, accelerator); | 1525 return toolbar_->GetAcceleratorForCommandId(command_id, accelerator); |
1526 } | 1526 } |
1527 | 1527 |
1528 bool BrowserView::IsLabelForCommandIdDynamic(int command_id) const { | 1528 bool BrowserView::IsItemForCommandIdDynamic(int command_id) const { |
1529 return command_id == IDC_RESTORE_TAB; | 1529 return command_id == IDC_RESTORE_TAB; |
1530 } | 1530 } |
1531 | 1531 |
1532 string16 BrowserView::GetLabelForCommandId(int command_id) const { | 1532 string16 BrowserView::GetLabelForCommandId(int command_id) const { |
1533 DCHECK(command_id == IDC_RESTORE_TAB); | 1533 DCHECK(command_id == IDC_RESTORE_TAB); |
1534 | 1534 |
1535 int string_id = IDS_RESTORE_TAB; | 1535 int string_id = IDS_RESTORE_TAB; |
1536 if (IsCommandIdEnabled(command_id)) { | 1536 if (IsCommandIdEnabled(command_id)) { |
1537 TabRestoreService* trs = browser_->profile()->GetTabRestoreService(); | 1537 TabRestoreService* trs = browser_->profile()->GetTabRestoreService(); |
1538 if (trs && trs->entries().front()->type == TabRestoreService::WINDOW) | 1538 if (trs && trs->entries().front()->type == TabRestoreService::WINDOW) |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2508 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); | 2508 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); |
2509 | 2509 |
2510 return view; | 2510 return view; |
2511 } | 2511 } |
2512 #endif | 2512 #endif |
2513 | 2513 |
2514 // static | 2514 // static |
2515 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2515 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2516 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2516 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2517 } | 2517 } |
OLD | NEW |