| OLD | NEW |
| 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/window/dialog_delegate.h" | 5 #include "ui/views/window/dialog_delegate.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "grit/ui_strings.h" | 8 #include "grit/ui_strings.h" |
| 9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
| 10 #include "ui/views/bubble/bubble_border.h" | 10 #include "ui/views/bubble/bubble_border.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 ui::NativeTheme::kColorId_DialogBackground); | 160 ui::NativeTheme::kColorId_DialogBackground); |
| 161 frame->SetBubbleBorder(scoped_ptr<BubbleBorder>(new BubbleBorder( | 161 frame->SetBubbleBorder(scoped_ptr<BubbleBorder>(new BubbleBorder( |
| 162 BubbleBorder::FLOAT, BubbleBorder::SMALL_SHADOW, color))); | 162 BubbleBorder::FLOAT, BubbleBorder::SMALL_SHADOW, color))); |
| 163 DialogDelegate* delegate = widget->widget_delegate()->AsDialogDelegate(); | 163 DialogDelegate* delegate = widget->widget_delegate()->AsDialogDelegate(); |
| 164 if (delegate) { | 164 if (delegate) { |
| 165 View* titlebar_view = delegate->CreateTitlebarExtraView(); | 165 View* titlebar_view = delegate->CreateTitlebarExtraView(); |
| 166 if (titlebar_view) | 166 if (titlebar_view) |
| 167 frame->SetTitlebarExtraView(titlebar_view); | 167 frame->SetTitlebarExtraView(titlebar_view); |
| 168 } | 168 } |
| 169 // TODO(msw): Add a matching shadow type and remove the bubble frame border? | 169 // TODO(msw): Add a matching shadow type and remove the bubble frame border? |
| 170 corewm::SetShadowType(widget->GetNativeWindow(), corewm::SHADOW_TYPE_NONE); | 170 wm::SetShadowType(widget->GetNativeWindow(), wm::SHADOW_TYPE_NONE); |
| 171 return frame; | 171 return frame; |
| 172 } | 172 } |
| 173 | 173 |
| 174 bool DialogDelegate::UseNewStyleForThisDialog() const { | 174 bool DialogDelegate::UseNewStyleForThisDialog() const { |
| 175 return true; | 175 return true; |
| 176 } | 176 } |
| 177 | 177 |
| 178 const DialogClientView* DialogDelegate::GetDialogClientView() const { | 178 const DialogClientView* DialogDelegate::GetDialogClientView() const { |
| 179 return GetWidget()->client_view()->AsDialogClientView(); | 179 return GetWidget()->client_view()->AsDialogClientView(); |
| 180 } | 180 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 207 | 207 |
| 208 const Widget* DialogDelegateView::GetWidget() const { | 208 const Widget* DialogDelegateView::GetWidget() const { |
| 209 return View::GetWidget(); | 209 return View::GetWidget(); |
| 210 } | 210 } |
| 211 | 211 |
| 212 View* DialogDelegateView::GetContentsView() { | 212 View* DialogDelegateView::GetContentsView() { |
| 213 return this; | 213 return this; |
| 214 } | 214 } |
| 215 | 215 |
| 216 } // namespace views | 216 } // namespace views |
| OLD | NEW |