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

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

Issue 407073002: Make chrome app colored frames available on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 if (app_window()->window_type_is_panel()) { 521 if (app_window()->window_type_is_panel()) {
522 ash::PanelFrameView::FrameType frame_type = IsFrameless() ? 522 ash::PanelFrameView::FrameType frame_type = IsFrameless() ?
523 ash::PanelFrameView::FRAME_NONE : ash::PanelFrameView::FRAME_ASH; 523 ash::PanelFrameView::FRAME_NONE : ash::PanelFrameView::FRAME_ASH;
524 views::NonClientFrameView* frame_view = 524 views::NonClientFrameView* frame_view =
525 new ash::PanelFrameView(widget, frame_type); 525 new ash::PanelFrameView(widget, frame_type);
526 frame_view->set_context_menu_controller(this); 526 frame_view->set_context_menu_controller(this);
527 return frame_view; 527 return frame_view;
528 } 528 }
529 529
530 if (IsFrameless()) 530 if (IsFrameless() || has_frame_color_)
531 return CreateNonStandardAppFrame(); 531 return CreateNonStandardAppFrame();
532 532
533 ash::CustomFrameViewAsh* custom_frame_view = 533 ash::CustomFrameViewAsh* custom_frame_view =
534 new ash::CustomFrameViewAsh(widget); 534 new ash::CustomFrameViewAsh(widget);
535 // Non-frameless app windows can be put into immersive fullscreen. 535 // Non-frameless app windows can be put into immersive fullscreen.
536 immersive_fullscreen_controller_.reset( 536 immersive_fullscreen_controller_.reset(
537 new ash::ImmersiveFullscreenController()); 537 new ash::ImmersiveFullscreenController());
538 custom_frame_view->InitImmersiveFullscreenControllerForView( 538 custom_frame_view->InitImmersiveFullscreenControllerForView(
539 immersive_fullscreen_controller_.get()); 539 immersive_fullscreen_controller_.get());
540 custom_frame_view->GetHeaderView()->set_context_menu_controller(this); 540 custom_frame_view->GetHeaderView()->set_context_menu_controller(this);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698