| 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/toolbar_view.h" | 5 #include "chrome/browser/views/toolbar_view.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
| 10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 LocationBarView::POPUP : LocationBarView::NORMAL); | 149 LocationBarView::POPUP : LocationBarView::NORMAL); |
| 150 | 150 |
| 151 reload_ = new ReloadButton(location_bar_, browser_); | 151 reload_ = new ReloadButton(location_bar_, browser_); |
| 152 reload_->set_triggerable_event_flags(views::Event::EF_LEFT_BUTTON_DOWN | | 152 reload_->set_triggerable_event_flags(views::Event::EF_LEFT_BUTTON_DOWN | |
| 153 views::Event::EF_MIDDLE_BUTTON_DOWN); | 153 views::Event::EF_MIDDLE_BUTTON_DOWN); |
| 154 reload_->set_tag(IDC_RELOAD); | 154 reload_->set_tag(IDC_RELOAD); |
| 155 reload_->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_RELOAD)); | 155 reload_->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_RELOAD)); |
| 156 reload_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_RELOAD)); | 156 reload_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_RELOAD)); |
| 157 reload_->SetID(VIEW_ID_RELOAD_BUTTON); | 157 reload_->SetID(VIEW_ID_RELOAD_BUTTON); |
| 158 | 158 |
| 159 browser_actions_ = new BrowserActionsContainer(browser_, this, true); | 159 browser_actions_ = new BrowserActionsContainer(browser_, this); |
| 160 | 160 |
| 161 if (!WrenchMenuModel::IsEnabled()) { | 161 if (!WrenchMenuModel::IsEnabled()) { |
| 162 page_menu_ = new views::MenuButton(NULL, std::wstring(), this, false); | 162 page_menu_ = new views::MenuButton(NULL, std::wstring(), this, false); |
| 163 page_menu_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_PAGE)); | 163 page_menu_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_PAGE)); |
| 164 page_menu_->SetTooltipText(l10n_util::GetString(IDS_PAGEMENU_TOOLTIP)); | 164 page_menu_->SetTooltipText(l10n_util::GetString(IDS_PAGEMENU_TOOLTIP)); |
| 165 page_menu_->SetID(VIEW_ID_PAGE_MENU); | 165 page_menu_->SetID(VIEW_ID_PAGE_MENU); |
| 166 } | 166 } |
| 167 | 167 |
| 168 app_menu_ = new views::MenuButton(NULL, std::wstring(), this, false); | 168 app_menu_ = new views::MenuButton(NULL, std::wstring(), this, false); |
| 169 app_menu_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_APP)); | 169 app_menu_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_APP)); |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 } | 796 } |
| 797 #endif | 797 #endif |
| 798 | 798 |
| 799 // Tell the menu button to activate, opening its pop-up menu. | 799 // Tell the menu button to activate, opening its pop-up menu. |
| 800 menu_button->Activate(); | 800 menu_button->Activate(); |
| 801 | 801 |
| 802 #if defined(OS_WIN) | 802 #if defined(OS_WIN) |
| 803 SetToolbarFocus(NULL, menu_button); | 803 SetToolbarFocus(NULL, menu_button); |
| 804 #endif | 804 #endif |
| 805 } | 805 } |
| OLD | NEW |