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/chromeos/status/network_menu.h" | 5 #include "chrome/browser/chromeos/status/network_menu.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 return menu_items_[index].label; | 241 return menu_items_[index].label; |
242 } | 242 } |
243 | 243 |
244 bool NetworkMenuModel::IsItemDynamicAt(int index) const { | 244 bool NetworkMenuModel::IsItemDynamicAt(int index) const { |
245 return false; | 245 return false; |
246 } | 246 } |
247 | 247 |
248 const gfx::FontList* NetworkMenuModel::GetLabelFontListAt(int index) const { | 248 const gfx::FontList* NetworkMenuModel::GetLabelFontListAt(int index) const { |
249 const gfx::FontList* font_list = NULL; | 249 const gfx::FontList* font_list = NULL; |
250 if (menu_items_[index].flags & FLAG_ASSOCIATED) { | 250 if (menu_items_[index].flags & FLAG_ASSOCIATED) { |
251 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 251 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); |
252 font_list = &rb.GetFontList(browser_defaults::kAssociatedNetworkFontStyle); | 252 font_list = &rb->GetFontList(browser_defaults::kAssociatedNetworkFontStyle); |
253 } | 253 } |
254 | 254 |
255 return font_list; | 255 return font_list; |
256 } | 256 } |
257 | 257 |
258 bool NetworkMenuModel::GetAcceleratorAt(int index, | 258 bool NetworkMenuModel::GetAcceleratorAt(int index, |
259 ui::Accelerator* accelerator) const { | 259 ui::Accelerator* accelerator) const { |
260 return false; | 260 return false; |
261 } | 261 } |
262 | 262 |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 return main_menu_model_.get(); | 671 return main_menu_model_.get(); |
672 } | 672 } |
673 | 673 |
674 void NetworkMenu::UpdateMenu() { | 674 void NetworkMenu::UpdateMenu() { |
675 refreshing_menu_ = true; | 675 refreshing_menu_ = true; |
676 main_menu_model_->InitMenuItems(delegate_->ShouldOpenButtonOptions()); | 676 main_menu_model_->InitMenuItems(delegate_->ShouldOpenButtonOptions()); |
677 refreshing_menu_ = false; | 677 refreshing_menu_ = false; |
678 } | 678 } |
679 | 679 |
680 } // namespace chromeos | 680 } // namespace chromeos |
OLD | NEW |