| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/wm/window_state.h" | 9 #include "ash/wm/window_state.h" |
| 10 #include "ash/wm/window_state_aura.h" | |
| 11 #include "base/bind.h" | 10 #include "base/bind.h" |
| 12 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 13 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
| 14 #include "chrome/browser/ui/ash/ash_util.h" | 13 #include "chrome/browser/ui/ash/ash_util.h" |
| 15 #include "ui/display/display.h" | 14 #include "ui/display/display.h" |
| 16 #include "ui/display/screen.h" | 15 #include "ui/display/screen.h" |
| 17 | 16 |
| 18 namespace { | 17 namespace { |
| 19 | 18 |
| 20 void ProcessAcceleratorNow(const ui::Accelerator& accelerator) { | 19 void ProcessAcceleratorNow(const ui::Accelerator& accelerator) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 params->context = params->context->GetRootWindow(); | 85 params->context = params->context->GetRootWindow(); |
| 87 DCHECK(params->parent || params->context || !params->child) | 86 DCHECK(params->parent || params->context || !params->child) |
| 88 << "Please provide a parent or context for this widget."; | 87 << "Please provide a parent or context for this widget."; |
| 89 if (!params->parent && !params->context) | 88 if (!params->parent && !params->context) |
| 90 params->context = ash::Shell::GetPrimaryRootWindow(); | 89 params->context = ash::Shell::GetPrimaryRootWindow(); |
| 91 | 90 |
| 92 // By returning null Widget creates the default NativeWidget implementation, | 91 // By returning null Widget creates the default NativeWidget implementation, |
| 93 // which for chromeos is NativeWidgetAura. | 92 // which for chromeos is NativeWidgetAura. |
| 94 return nullptr; | 93 return nullptr; |
| 95 } | 94 } |
| OLD | NEW |