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

Side by Side Diff: ui/views/widget/widget_delegate.cc

Issue 2189123002: BubbleFrameView: add padding if platform dislikes close buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test coverage! Created 4 years, 4 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 "ui/views/widget/widget_delegate.h" 5 #include "ui/views/widget/widget_delegate.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/gfx/image/image_skia.h" 8 #include "ui/gfx/image/image_skia.h"
9 #include "ui/views/view.h" 9 #include "ui/views/view.h"
10 #include "ui/views/views_delegate.h" 10 #include "ui/views/views_delegate.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 base::string16 WidgetDelegate::GetWindowTitle() const { 73 base::string16 WidgetDelegate::GetWindowTitle() const {
74 return base::string16(); 74 return base::string16();
75 } 75 }
76 76
77 bool WidgetDelegate::ShouldShowWindowTitle() const { 77 bool WidgetDelegate::ShouldShowWindowTitle() const {
78 return true; 78 return true;
79 } 79 }
80 80
81 bool WidgetDelegate::ShouldShowCloseButton() const { 81 bool WidgetDelegate::ShouldShowCloseButton() const {
82 #if defined(OS_MACOSX)
83 return false;
84 #else
85 return true; 82 return true;
86 #endif
87 } 83 }
88 84
89 bool WidgetDelegate::ShouldHandleSystemCommands() const { 85 bool WidgetDelegate::ShouldHandleSystemCommands() const {
90 const Widget* widget = GetWidget(); 86 const Widget* widget = GetWidget();
91 if (!widget) 87 if (!widget)
92 return false; 88 return false;
93 89
94 return widget->non_client_view() != NULL; 90 return widget->non_client_view() != NULL;
95 } 91 }
96 92
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 202
207 const Widget* WidgetDelegateView::GetWidget() const { 203 const Widget* WidgetDelegateView::GetWidget() const {
208 return View::GetWidget(); 204 return View::GetWidget();
209 } 205 }
210 206
211 const char* WidgetDelegateView::GetClassName() const { 207 const char* WidgetDelegateView::GetClassName() const {
212 return kViewClassName; 208 return kViewClassName;
213 } 209 }
214 210
215 } // namespace views 211 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698