| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/apps/chrome_native_app_window_views.h" | 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h" |
| 6 | 6 |
| 7 #include "apps/ui/views/app_window_frame_view.h" | 7 #include "apps/ui/views/app_window_frame_view.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/app_mode/app_mode_utils.h" | 10 #include "chrome/browser/app_mode/app_mode_utils.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 return accelerators; | 117 return accelerators; |
| 118 } | 118 } |
| 119 | 119 |
| 120 #if defined(USE_ASH) | 120 #if defined(USE_ASH) |
| 121 // This class handles a user's fullscreen request (Shift+F4/F4). | 121 // This class handles a user's fullscreen request (Shift+F4/F4). |
| 122 class NativeAppWindowStateDelegate : public ash::wm::WindowStateDelegate, | 122 class NativeAppWindowStateDelegate : public ash::wm::WindowStateDelegate, |
| 123 public ash::wm::WindowStateObserver, | 123 public ash::wm::WindowStateObserver, |
| 124 public aura::WindowObserver { | 124 public aura::WindowObserver { |
| 125 public: | 125 public: |
| 126 NativeAppWindowStateDelegate(AppWindow* app_window, | 126 NativeAppWindowStateDelegate(AppWindow* app_window, |
| 127 apps::NativeAppWindow* native_app_window) | 127 extensions::NativeAppWindow* native_app_window) |
| 128 : app_window_(app_window), | 128 : app_window_(app_window), |
| 129 window_state_( | 129 window_state_( |
| 130 ash::wm::GetWindowState(native_app_window->GetNativeWindow())) { | 130 ash::wm::GetWindowState(native_app_window->GetNativeWindow())) { |
| 131 // Add a window state observer to exit fullscreen properly in case | 131 // Add a window state observer to exit fullscreen properly in case |
| 132 // fullscreen is exited without going through AppWindow::Restore(). This | 132 // fullscreen is exited without going through AppWindow::Restore(). This |
| 133 // is the case when exiting immersive fullscreen via the "Restore" window | 133 // is the case when exiting immersive fullscreen via the "Restore" window |
| 134 // control. | 134 // control. |
| 135 // TODO(pkotwicz): This is a hack. Remove ASAP. http://crbug.com/319048 | 135 // TODO(pkotwicz): This is a hack. Remove ASAP. http://crbug.com/319048 |
| 136 window_state_->AddObserver(this); | 136 window_state_->AddObserver(this); |
| 137 window_state_->window()->AddObserver(this); | 137 window_state_->window()->AddObserver(this); |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 InitializePanelWindow(create_params); | 698 InitializePanelWindow(create_params); |
| 699 } else { | 699 } else { |
| 700 InitializeDefaultWindow(create_params); | 700 InitializeDefaultWindow(create_params); |
| 701 } | 701 } |
| 702 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 702 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
| 703 Profile::FromBrowserContext(app_window->browser_context()), | 703 Profile::FromBrowserContext(app_window->browser_context()), |
| 704 widget()->GetFocusManager(), | 704 widget()->GetFocusManager(), |
| 705 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 705 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
| 706 NULL)); | 706 NULL)); |
| 707 } | 707 } |
| OLD | NEW |