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

Side by Side Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc

Issue 613563002: Make WindowState::CanMinimize() take into account WidgetDelegate::CanMinimize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/frame/browser_non_client_frame_view_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/frame/caption_buttons/frame_caption_button.h" 9 #include "ash/frame/caption_buttons/frame_caption_button.h"
10 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 10 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() { 109 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() {
110 ash::Shell::GetInstance()->RemoveShellObserver(this); 110 ash::Shell::GetInstance()->RemoveShellObserver(this);
111 // browser_view() outlives the frame, as destruction of sibling views happens 111 // browser_view() outlives the frame, as destruction of sibling views happens
112 // in the same order as creation - see BrowserView::CreateBrowserWindow. 112 // in the same order as creation - see BrowserView::CreateBrowserWindow.
113 chrome::RemoveCommandObserver(browser_view()->browser(), IDC_BACK, this); 113 chrome::RemoveCommandObserver(browser_view()->browser(), IDC_BACK, this);
114 } 114 }
115 115
116 void BrowserNonClientFrameViewAsh::Init() { 116 void BrowserNonClientFrameViewAsh::Init() {
117 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame(), 117 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame());
118 ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
119 caption_button_container_->UpdateSizeButtonVisibility(); 118 caption_button_container_->UpdateSizeButtonVisibility();
120 AddChildView(caption_button_container_); 119 AddChildView(caption_button_container_);
121 120
122 // Initializing the TabIconView is expensive, so only do it if we need to. 121 // Initializing the TabIconView is expensive, so only do it if we need to.
123 if (browser_view()->ShouldShowWindowIcon()) { 122 if (browser_view()->ShouldShowWindowIcon()) {
124 window_icon_ = new TabIconView(this, NULL); 123 window_icon_ = new TabIconView(this, NULL);
125 window_icon_->set_is_light(true); 124 window_icon_->set_is_light(true);
126 AddChildView(window_icon_); 125 AddChildView(window_icon_);
127 window_icon_->Update(); 126 window_icon_->Update();
128 } 127 }
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(), 643 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(),
645 width(), kClientEdgeThickness), 644 width(), kClientEdgeThickness),
646 ThemeProperties::GetDefaultColor( 645 ThemeProperties::GetDefaultColor(
647 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); 646 ThemeProperties::COLOR_TOOLBAR_SEPARATOR));
648 } 647 }
649 648
650 void BrowserNonClientFrameViewAsh::UpdateBackButtonState(bool enabled) { 649 void BrowserNonClientFrameViewAsh::UpdateBackButtonState(bool enabled) {
651 web_app_back_button_->SetState(enabled ? views::Button::STATE_NORMAL 650 web_app_back_button_->SetState(enabled ? views::Button::STATE_NORMAL
652 : views::Button::STATE_DISABLED); 651 : views::Button::STATE_DISABLED);
653 } 652 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/login_web_dialog_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698