| 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/frame/browser_frame.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "chrome/browser/ui/views/frame/top_container_view.h" | 26 #include "chrome/browser/ui/views/frame/top_container_view.h" |
| 27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
| 28 #include "ui/base/hit_test.h" | 28 #include "ui/base/hit_test.h" |
| 29 #include "ui/events/event_handler.h" | 29 #include "ui/events/event_handler.h" |
| 30 #include "ui/gfx/font_list.h" | 30 #include "ui/gfx/font_list.h" |
| 31 #include "ui/views/controls/menu/menu_runner.h" | 31 #include "ui/views/controls/menu/menu_runner.h" |
| 32 #include "ui/views/widget/native_widget.h" | 32 #include "ui/views/widget/native_widget.h" |
| 33 | 33 |
| 34 #if defined(OS_CHROMEOS) | 34 #if defined(OS_CHROMEOS) |
| 35 #include "ash/common/session/session_state_delegate.h" | 35 #include "ash/common/session/session_state_delegate.h" |
| 36 #include "ash/shell.h" | 36 #include "ash/common/wm_shell.h" |
| 37 #include "ui/native_theme/native_theme_dark_aura.h" | 37 #include "ui/native_theme/native_theme_dark_aura.h" |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 #if defined(OS_LINUX) | 40 #if defined(OS_LINUX) |
| 41 #include "chrome/browser/ui/views/frame/browser_command_handler_linux.h" | 41 #include "chrome/browser/ui/views/frame/browser_command_handler_linux.h" |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 45 #include "ui/native_theme/native_theme_dark_win.h" | 45 #include "ui/native_theme/native_theme_dark_win.h" |
| 46 #endif | 46 #endif |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 source_type) == | 248 source_type) == |
| 249 views::MenuRunner::MENU_DELETED) { | 249 views::MenuRunner::MENU_DELETED) { |
| 250 return; | 250 return; |
| 251 } | 251 } |
| 252 } | 252 } |
| 253 } | 253 } |
| 254 | 254 |
| 255 ui::MenuModel* BrowserFrame::GetSystemMenuModel() { | 255 ui::MenuModel* BrowserFrame::GetSystemMenuModel() { |
| 256 #if defined(OS_CHROMEOS) | 256 #if defined(OS_CHROMEOS) |
| 257 ash::SessionStateDelegate* delegate = | 257 ash::SessionStateDelegate* delegate = |
| 258 ash::Shell::GetInstance()->session_state_delegate(); | 258 ash::WmShell::Get()->GetSessionStateDelegate(); |
| 259 if (delegate && delegate->NumberOfLoggedInUsers() > 1) { | 259 if (delegate && delegate->NumberOfLoggedInUsers() > 1) { |
| 260 // In Multi user mode, the number of users as well as the order of users | 260 // In Multi user mode, the number of users as well as the order of users |
| 261 // can change. Coming here we have more then one user and since the menu | 261 // can change. Coming here we have more then one user and since the menu |
| 262 // model contains the user information, it must get updated to show any | 262 // model contains the user information, it must get updated to show any |
| 263 // changes happened since the last invocation. | 263 // changes happened since the last invocation. |
| 264 menu_model_builder_.reset(); | 264 menu_model_builder_.reset(); |
| 265 } | 265 } |
| 266 #endif | 266 #endif |
| 267 if (!menu_model_builder_.get()) { | 267 if (!menu_model_builder_.get()) { |
| 268 menu_model_builder_.reset( | 268 menu_model_builder_.reset( |
| 269 new SystemMenuModelBuilder(browser_view_, browser_view_->browser())); | 269 new SystemMenuModelBuilder(browser_view_, browser_view_->browser())); |
| 270 menu_model_builder_->Init(); | 270 menu_model_builder_->Init(); |
| 271 } | 271 } |
| 272 return menu_model_builder_->menu_model(); | 272 return menu_model_builder_->menu_model(); |
| 273 } | 273 } |
| 274 | 274 |
| 275 views::View* BrowserFrame::GetNewAvatarMenuButton() { | 275 views::View* BrowserFrame::GetNewAvatarMenuButton() { |
| 276 return browser_frame_view_->GetProfileSwitcherView(); | 276 return browser_frame_view_->GetProfileSwitcherView(); |
| 277 } | 277 } |
| OLD | NEW |