| 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/chrome_views_delegate.h" | 5 #include "chrome/browser/ui/views/chrome_views_delegate.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 #endif | 287 #endif |
| 288 } | 288 } |
| 289 | 289 |
| 290 views::ViewsDelegate::ProcessMenuAcceleratorResult | 290 views::ViewsDelegate::ProcessMenuAcceleratorResult |
| 291 ChromeViewsDelegate::ProcessAcceleratorWhileMenuShowing( | 291 ChromeViewsDelegate::ProcessAcceleratorWhileMenuShowing( |
| 292 const ui::Accelerator& accelerator) { | 292 const ui::Accelerator& accelerator) { |
| 293 #if defined(USE_ASH) | 293 #if defined(USE_ASH) |
| 294 DCHECK(base::MessageLoopForUI::IsCurrent()); | 294 DCHECK(base::MessageLoopForUI::IsCurrent()); |
| 295 | 295 |
| 296 // Early return because mash chrome does not have access to ash::Shell | 296 // Early return because mash chrome does not have access to ash::Shell |
| 297 if (ash_util::IsRunningInMash()) | 297 if (IsRunningInMash()) |
| 298 return views::ViewsDelegate::ProcessMenuAcceleratorResult::LEAVE_MENU_OPEN; | 298 return views::ViewsDelegate::ProcessMenuAcceleratorResult::LEAVE_MENU_OPEN; |
| 299 | 299 |
| 300 ash::AcceleratorController* accelerator_controller = | 300 ash::AcceleratorController* accelerator_controller = |
| 301 ash::WmShell::Get()->accelerator_controller(); | 301 ash::WmShell::Get()->accelerator_controller(); |
| 302 | 302 |
| 303 accelerator_controller->accelerator_history()->StoreCurrentAccelerator( | 303 accelerator_controller->accelerator_history()->StoreCurrentAccelerator( |
| 304 accelerator); | 304 accelerator); |
| 305 if (accelerator_controller->ShouldCloseMenuAndRepostAccelerator( | 305 if (accelerator_controller->ShouldCloseMenuAndRepostAccelerator( |
| 306 accelerator)) { | 306 accelerator)) { |
| 307 base::ThreadTaskRunnerHandle::Get()->PostTask( | 307 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); | 500 LayoutDelegate::Metric::BUTTON_HORIZONTAL_PADDING); |
| 501 } | 501 } |
| 502 | 502 |
| 503 #if !defined(USE_ASH) | 503 #if !defined(USE_ASH) |
| 504 views::Widget::InitParams::WindowOpacity | 504 views::Widget::InitParams::WindowOpacity |
| 505 ChromeViewsDelegate::GetOpacityForInitParams( | 505 ChromeViewsDelegate::GetOpacityForInitParams( |
| 506 const views::Widget::InitParams& params) { | 506 const views::Widget::InitParams& params) { |
| 507 return views::Widget::InitParams::OPAQUE_WINDOW; | 507 return views::Widget::InitParams::OPAQUE_WINDOW; |
| 508 } | 508 } |
| 509 #endif | 509 #endif |
| OLD | NEW |