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

Side by Side Diff: ui/views/window/custom_frame_view.cc

Issue 8618001: Get rid of the EnableClose() infrastructure in Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « ui/views/window/custom_frame_view.h ('k') | ui/views/window/native_frame_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/views/window/custom_frame_view.h" 5 #include "ui/views/window/custom_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 void CustomFrameView::GetWindowMask(const gfx::Size& size, 186 void CustomFrameView::GetWindowMask(const gfx::Size& size,
187 gfx::Path* window_mask) { 187 gfx::Path* window_mask) {
188 DCHECK(window_mask); 188 DCHECK(window_mask);
189 if (frame_->IsMaximized()) 189 if (frame_->IsMaximized())
190 return; 190 return;
191 191
192 views::GetDefaultWindowMask(size, window_mask); 192 views::GetDefaultWindowMask(size, window_mask);
193 } 193 }
194 194
195 void CustomFrameView::EnableClose(bool enable) {
196 close_button_->SetEnabled(enable);
197 }
198
199 void CustomFrameView::ResetWindowControls() { 195 void CustomFrameView::ResetWindowControls() {
200 restore_button_->SetState(CustomButton::BS_NORMAL); 196 restore_button_->SetState(CustomButton::BS_NORMAL);
201 minimize_button_->SetState(CustomButton::BS_NORMAL); 197 minimize_button_->SetState(CustomButton::BS_NORMAL);
202 maximize_button_->SetState(CustomButton::BS_NORMAL); 198 maximize_button_->SetState(CustomButton::BS_NORMAL);
203 // The close button isn't affected by this constraint. 199 // The close button isn't affected by this constraint.
204 } 200 }
205 201
206 void CustomFrameView::UpdateWindowIcon() { 202 void CustomFrameView::UpdateWindowIcon() {
207 window_icon_->SchedulePaint(); 203 window_icon_->SchedulePaint();
208 } 204 }
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 title_font_ = new gfx::Font(NativeWidgetWin::GetWindowTitleFont()); 596 title_font_ = new gfx::Font(NativeWidgetWin::GetWindowTitleFont());
601 #elif defined(OS_LINUX) 597 #elif defined(OS_LINUX)
602 // TODO(ben): need to resolve what font this is. 598 // TODO(ben): need to resolve what font this is.
603 title_font_ = new gfx::Font(); 599 title_font_ = new gfx::Font();
604 #endif 600 #endif
605 initialized = true; 601 initialized = true;
606 } 602 }
607 } 603 }
608 604
609 } // namespace views 605 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/window/custom_frame_view.h ('k') | ui/views/window/native_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698