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

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

Issue 553333007: [Ash] Always show minimize button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove enum MinimizeAllowed. Created 6 years, 3 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() { 106 BrowserNonClientFrameViewAsh::~BrowserNonClientFrameViewAsh() {
107 ash::Shell::GetInstance()->RemoveShellObserver(this); 107 ash::Shell::GetInstance()->RemoveShellObserver(this);
108 // browser_view() outlives the frame, as destruction of sibling views happens 108 // browser_view() outlives the frame, as destruction of sibling views happens
109 // in the same order as creation - see BrowserView::CreateBrowserWindow. 109 // in the same order as creation - see BrowserView::CreateBrowserWindow.
110 chrome::RemoveCommandObserver(browser_view()->browser(), IDC_BACK, this); 110 chrome::RemoveCommandObserver(browser_view()->browser(), IDC_BACK, this);
111 } 111 }
112 112
113 void BrowserNonClientFrameViewAsh::Init() { 113 void BrowserNonClientFrameViewAsh::Init() {
114 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame(), 114 caption_button_container_ = new ash::FrameCaptionButtonContainerView(frame());
115 ash::FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
116 caption_button_container_->UpdateSizeButtonVisibility(); 115 caption_button_container_->UpdateSizeButtonVisibility();
117 AddChildView(caption_button_container_); 116 AddChildView(caption_button_container_);
118 117
119 // Initializing the TabIconView is expensive, so only do it if we need to. 118 // Initializing the TabIconView is expensive, so only do it if we need to.
120 if (browser_view()->ShouldShowWindowIcon()) { 119 if (browser_view()->ShouldShowWindowIcon()) {
121 window_icon_ = new TabIconView(this, NULL); 120 window_icon_ = new TabIconView(this, NULL);
122 window_icon_->set_is_light(true); 121 window_icon_->set_is_light(true);
123 AddChildView(window_icon_); 122 AddChildView(window_icon_);
124 window_icon_->Update(); 123 window_icon_->Update();
125 } 124 }
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(), 632 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(),
634 width(), kClientEdgeThickness), 633 width(), kClientEdgeThickness),
635 ThemeProperties::GetDefaultColor( 634 ThemeProperties::GetDefaultColor(
636 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); 635 ThemeProperties::COLOR_TOOLBAR_SEPARATOR));
637 } 636 }
638 637
639 void BrowserNonClientFrameViewAsh::UpdateBackButtonState(bool enabled) { 638 void BrowserNonClientFrameViewAsh::UpdateBackButtonState(bool enabled) {
640 web_app_back_button_->SetState(enabled ? views::Button::STATE_NORMAL 639 web_app_back_button_->SetState(enabled ? views::Button::STATE_NORMAL
641 : views::Button::STATE_DISABLED); 640 : views::Button::STATE_DISABLED);
642 } 641 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698