| 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 | 576 |
| 577 // NativeAppWindow implementation. | 577 // NativeAppWindow implementation. |
| 578 | 578 |
| 579 void ChromeNativeAppWindowViews::SetFullscreen(int fullscreen_types) { | 579 void ChromeNativeAppWindowViews::SetFullscreen(int fullscreen_types) { |
| 580 // Fullscreen not supported by panels. | 580 // Fullscreen not supported by panels. |
| 581 if (app_window()->window_type_is_panel()) | 581 if (app_window()->window_type_is_panel()) |
| 582 return; | 582 return; |
| 583 is_fullscreen_ = (fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE); | 583 is_fullscreen_ = (fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE); |
| 584 widget()->SetFullscreen(is_fullscreen_); | 584 widget()->SetFullscreen(is_fullscreen_); |
| 585 | 585 |
| 586 #if defined(USE_ASH) | 586 // TODO(oshima): Remove USE_ATHENA once athena has its own NativeAppWindow. |
| 587 #if defined(USE_ASH) && !defined(USE_ATHENA) |
| 587 if (immersive_fullscreen_controller_.get()) { | 588 if (immersive_fullscreen_controller_.get()) { |
| 588 // |immersive_fullscreen_controller_| should only be set if immersive | 589 // |immersive_fullscreen_controller_| should only be set if immersive |
| 589 // fullscreen is the fullscreen type used by the OS. | 590 // fullscreen is the fullscreen type used by the OS. |
| 590 immersive_fullscreen_controller_->SetEnabled( | 591 immersive_fullscreen_controller_->SetEnabled( |
| 591 ash::ImmersiveFullscreenController::WINDOW_TYPE_PACKAGED_APP, | 592 ash::ImmersiveFullscreenController::WINDOW_TYPE_PACKAGED_APP, |
| 592 (fullscreen_types & AppWindow::FULLSCREEN_TYPE_OS) != 0); | 593 (fullscreen_types & AppWindow::FULLSCREEN_TYPE_OS) != 0); |
| 593 // Autohide the shelf instead of hiding the shelf completely when only in | 594 // Autohide the shelf instead of hiding the shelf completely when only in |
| 594 // OS fullscreen. | 595 // OS fullscreen. |
| 595 ash::wm::WindowState* window_state = | 596 ash::wm::WindowState* window_state = |
| 596 ash::wm::GetWindowState(widget()->GetNativeWindow()); | 597 ash::wm::GetWindowState(widget()->GetNativeWindow()); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 InitializePanelWindow(create_params); | 671 InitializePanelWindow(create_params); |
| 671 } else { | 672 } else { |
| 672 InitializeDefaultWindow(create_params); | 673 InitializeDefaultWindow(create_params); |
| 673 } | 674 } |
| 674 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 675 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
| 675 Profile::FromBrowserContext(app_window->browser_context()), | 676 Profile::FromBrowserContext(app_window->browser_context()), |
| 676 widget()->GetFocusManager(), | 677 widget()->GetFocusManager(), |
| 677 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 678 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
| 678 NULL)); | 679 NULL)); |
| 679 } | 680 } |
| OLD | NEW |