| 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 #include "chrome/browser/ui/views/toolbar_view.h" | 5 #include "chrome/browser/ui/views/toolbar_view.h" |
| 6 | 6 |
| 7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/command_updater.h" | 10 #include "chrome/browser/command_updater.h" |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 wrench_menu_->Init(wrench_menu_model_.get()); | 442 wrench_menu_->Init(wrench_menu_model_.get()); |
| 443 | 443 |
| 444 FOR_EACH_OBSERVER(views::MenuListener, menu_listeners_, OnMenuOpened()); | 444 FOR_EACH_OBSERVER(views::MenuListener, menu_listeners_, OnMenuOpened()); |
| 445 | 445 |
| 446 wrench_menu_->RunMenu(app_menu_); | 446 wrench_menu_->RunMenu(app_menu_); |
| 447 } | 447 } |
| 448 | 448 |
| 449 //////////////////////////////////////////////////////////////////////////////// | 449 //////////////////////////////////////////////////////////////////////////////// |
| 450 // ToolbarView, LocationBarView::Delegate implementation: | 450 // ToolbarView, LocationBarView::Delegate implementation: |
| 451 | 451 |
| 452 TabContents* ToolbarView::GetTabContents() const { | 452 content::WebContents* ToolbarView::GetWebContents() const { |
| 453 return chrome::GetActiveTabContents(browser_); | 453 return chrome::GetActiveWebContents(browser_); |
| 454 } | 454 } |
| 455 | 455 |
| 456 InstantController* ToolbarView::GetInstant() { | 456 InstantController* ToolbarView::GetInstant() { |
| 457 return browser_->instant_controller()->instant(); | 457 return browser_->instant_controller()->instant(); |
| 458 } | 458 } |
| 459 | 459 |
| 460 ContentSettingBubbleModelDelegate* | 460 ContentSettingBubbleModelDelegate* |
| 461 ToolbarView::GetContentSettingBubbleModelDelegate() { | 461 ToolbarView::GetContentSettingBubbleModelDelegate() { |
| 462 return browser_->content_setting_bubble_model_delegate(); | 462 return browser_->content_setting_bubble_model_delegate(); |
| 463 } | 463 } |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 accname_app = l10n_util::GetStringFUTF16( | 903 accname_app = l10n_util::GetStringFUTF16( |
| 904 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); | 904 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); |
| 905 } | 905 } |
| 906 app_menu_->SetAccessibleName(accname_app); | 906 app_menu_->SetAccessibleName(accname_app); |
| 907 | 907 |
| 908 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::STATE_NORMAL)); | 908 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::STATE_NORMAL)); |
| 909 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::STATE_HOVERED)); | 909 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::STATE_HOVERED)); |
| 910 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::STATE_PRESSED)); | 910 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::STATE_PRESSED)); |
| 911 SchedulePaint(); | 911 SchedulePaint(); |
| 912 } | 912 } |
| OLD | NEW |