| 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/wrench_menu.h" | 5 #include "chrome/browser/ui/views/wrench_menu.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 const ui::Event& event) OVERRIDE { | 626 const ui::Event& event) OVERRIDE { |
| 627 if (sender->tag() == fullscreen_index_) { | 627 if (sender->tag() == fullscreen_index_) { |
| 628 menu_->CancelAndEvaluate(menu_model_, sender->tag()); | 628 menu_->CancelAndEvaluate(menu_model_, sender->tag()); |
| 629 } else { | 629 } else { |
| 630 // Zoom buttons don't close the menu. | 630 // Zoom buttons don't close the menu. |
| 631 menu_model_->ActivatedAt(sender->tag()); | 631 menu_model_->ActivatedAt(sender->tag()); |
| 632 } | 632 } |
| 633 } | 633 } |
| 634 | 634 |
| 635 private: | 635 private: |
| 636 void OnZoomLevelChanged(const std::string& host) { | 636 void OnZoomLevelChanged(const HostZoomMap::ZoomLevelChange& change) { |
| 637 UpdateZoomControls(); | 637 UpdateZoomControls(); |
| 638 } | 638 } |
| 639 | 639 |
| 640 void UpdateZoomControls() { | 640 void UpdateZoomControls() { |
| 641 bool enable_increment = false; | 641 bool enable_increment = false; |
| 642 bool enable_decrement = false; | 642 bool enable_decrement = false; |
| 643 WebContents* selected_tab = | 643 WebContents* selected_tab = |
| 644 menu_->browser_->tab_strip_model()->GetActiveWebContents(); | 644 menu_->browser_->tab_strip_model()->GetActiveWebContents(); |
| 645 int zoom = 100; | 645 int zoom = 100; |
| 646 if (selected_tab) | 646 if (selected_tab) |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 bookmark_menu_delegate_.reset( | 1146 bookmark_menu_delegate_.reset( |
| 1147 new BookmarkMenuDelegate(browser_, | 1147 new BookmarkMenuDelegate(browser_, |
| 1148 browser_, | 1148 browser_, |
| 1149 parent, | 1149 parent, |
| 1150 first_bookmark_command_id_)); | 1150 first_bookmark_command_id_)); |
| 1151 bookmark_menu_delegate_->Init( | 1151 bookmark_menu_delegate_->Init( |
| 1152 this, bookmark_menu_, model->bookmark_bar_node(), 0, | 1152 this, bookmark_menu_, model->bookmark_bar_node(), 0, |
| 1153 BookmarkMenuDelegate::SHOW_PERMANENT_FOLDERS, | 1153 BookmarkMenuDelegate::SHOW_PERMANENT_FOLDERS, |
| 1154 bookmark_utils::LAUNCH_WRENCH_MENU); | 1154 bookmark_utils::LAUNCH_WRENCH_MENU); |
| 1155 } | 1155 } |
| OLD | NEW |