| 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 // Windows Ash. | 546 // Windows Ash. |
| 547 immersive_fullscreen_controller_.reset( | 547 immersive_fullscreen_controller_.reset( |
| 548 new ash::ImmersiveFullscreenController()); | 548 new ash::ImmersiveFullscreenController()); |
| 549 custom_frame_view->InitImmersiveFullscreenControllerForView( | 549 custom_frame_view->InitImmersiveFullscreenControllerForView( |
| 550 immersive_fullscreen_controller_.get()); | 550 immersive_fullscreen_controller_.get()); |
| 551 #endif | 551 #endif |
| 552 custom_frame_view->GetHeaderView()->set_context_menu_controller(this); | 552 custom_frame_view->GetHeaderView()->set_context_menu_controller(this); |
| 553 return custom_frame_view; | 553 return custom_frame_view; |
| 554 } | 554 } |
| 555 #endif | 555 #endif |
| 556 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 556 return (IsFrameless() || has_frame_color_) ? |
| 557 // Linux always uses the non standard frame view because the OS draws the | 557 CreateNonStandardAppFrame() : CreateStandardDesktopAppFrame(); |
| 558 // frame (if a frame is needed). | |
| 559 return CreateNonStandardAppFrame(); | |
| 560 #else | |
| 561 if (IsFrameless() || has_frame_color_) | |
| 562 return CreateNonStandardAppFrame(); | |
| 563 #endif | |
| 564 return CreateStandardDesktopAppFrame(); | |
| 565 } | 558 } |
| 566 | 559 |
| 567 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const { | 560 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const { |
| 568 return shape_ != NULL; | 561 return shape_ != NULL; |
| 569 } | 562 } |
| 570 | 563 |
| 571 void ChromeNativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const { | 564 void ChromeNativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const { |
| 572 shape_->getBoundaryPath(mask); | 565 shape_->getBoundaryPath(mask); |
| 573 } | 566 } |
| 574 | 567 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 InitializePanelWindow(create_params); | 711 InitializePanelWindow(create_params); |
| 719 } else { | 712 } else { |
| 720 InitializeDefaultWindow(create_params); | 713 InitializeDefaultWindow(create_params); |
| 721 } | 714 } |
| 722 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( | 715 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( |
| 723 Profile::FromBrowserContext(app_window->browser_context()), | 716 Profile::FromBrowserContext(app_window->browser_context()), |
| 724 widget()->GetFocusManager(), | 717 widget()->GetFocusManager(), |
| 725 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 718 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
| 726 NULL)); | 719 NULL)); |
| 727 } | 720 } |
| OLD | NEW |