Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views.cc

Issue 664443002: Support chrome app frame colors on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/frame/default_header_painter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 return CreateNonStandardAppFrame(); 537 return CreateNonStandardAppFrame();
538 538
539 ash::CustomFrameViewAsh* custom_frame_view = 539 ash::CustomFrameViewAsh* custom_frame_view =
540 new ash::CustomFrameViewAsh(widget); 540 new ash::CustomFrameViewAsh(widget);
541 // Non-frameless app windows can be put into immersive fullscreen. 541 // Non-frameless app windows can be put into immersive fullscreen.
542 immersive_fullscreen_controller_.reset( 542 immersive_fullscreen_controller_.reset(
543 new ash::ImmersiveFullscreenController()); 543 new ash::ImmersiveFullscreenController());
544 custom_frame_view->InitImmersiveFullscreenControllerForView( 544 custom_frame_view->InitImmersiveFullscreenControllerForView(
545 immersive_fullscreen_controller_.get()); 545 immersive_fullscreen_controller_.get());
546 custom_frame_view->GetHeaderView()->set_context_menu_controller(this); 546 custom_frame_view->GetHeaderView()->set_context_menu_controller(this);
547
548 if (has_frame_color_) {
549 custom_frame_view->SetFrameColors(active_frame_color_,
550 inactive_frame_color_);
551 }
552
547 return custom_frame_view; 553 return custom_frame_view;
548 } 554 }
549 #endif 555 #endif
550 return (IsFrameless() || has_frame_color_) ? 556 return (IsFrameless() || has_frame_color_) ?
551 CreateNonStandardAppFrame() : CreateStandardDesktopAppFrame(); 557 CreateNonStandardAppFrame() : CreateStandardDesktopAppFrame();
552 } 558 }
553 559
554 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const { 560 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const {
555 return shape_ != NULL; 561 return shape_ != NULL;
556 } 562 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 InitializePanelWindow(create_params); 701 InitializePanelWindow(create_params);
696 } else { 702 } else {
697 InitializeDefaultWindow(create_params); 703 InitializeDefaultWindow(create_params);
698 } 704 }
699 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( 705 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
700 Profile::FromBrowserContext(app_window->browser_context()), 706 Profile::FromBrowserContext(app_window->browser_context()),
701 widget()->GetFocusManager(), 707 widget()->GetFocusManager(),
702 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, 708 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
703 NULL)); 709 NULL));
704 } 710 }
OLDNEW
« no previous file with comments | « ash/frame/default_header_painter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698