| 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/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/bubble/bubble_delegate.h" | 9 #include "ui/views/bubble/bubble_delegate.h" |
| 10 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
| 11 #include "ui/views/views_delegate.h" | 11 #include "ui/views/views_delegate.h" |
| 12 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
| 13 #include "ui/views/window/client_view.h" | 13 #include "ui/views/window/client_view.h" |
| 14 | 14 |
| 15 namespace views { | 15 namespace views { |
| 16 | 16 |
| 17 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
| 18 // WidgetDelegate: | 18 // WidgetDelegate: |
| 19 | 19 |
| 20 WidgetDelegate::WidgetDelegate() : default_contents_view_(NULL) { | 20 WidgetDelegate::WidgetDelegate() |
| 21 : default_contents_view_(NULL), |
| 22 can_activate_(true) { |
| 21 } | 23 } |
| 22 | 24 |
| 23 void WidgetDelegate::OnWidgetMove() { | 25 void WidgetDelegate::OnWidgetMove() { |
| 24 } | 26 } |
| 25 | 27 |
| 26 void WidgetDelegate::OnDisplayChanged() { | 28 void WidgetDelegate::OnDisplayChanged() { |
| 27 } | 29 } |
| 28 | 30 |
| 29 void WidgetDelegate::OnWorkAreaChanged() { | 31 void WidgetDelegate::OnWorkAreaChanged() { |
| 30 } | 32 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 43 | 45 |
| 44 bool WidgetDelegate::CanResize() const { | 46 bool WidgetDelegate::CanResize() const { |
| 45 return false; | 47 return false; |
| 46 } | 48 } |
| 47 | 49 |
| 48 bool WidgetDelegate::CanMaximize() const { | 50 bool WidgetDelegate::CanMaximize() const { |
| 49 return false; | 51 return false; |
| 50 } | 52 } |
| 51 | 53 |
| 52 bool WidgetDelegate::CanActivate() const { | 54 bool WidgetDelegate::CanActivate() const { |
| 53 return true; | 55 return can_activate_; |
| 54 } | 56 } |
| 55 | 57 |
| 56 ui::ModalType WidgetDelegate::GetModalType() const { | 58 ui::ModalType WidgetDelegate::GetModalType() const { |
| 57 return ui::MODAL_TYPE_NONE; | 59 return ui::MODAL_TYPE_NONE; |
| 58 } | 60 } |
| 59 | 61 |
| 60 ui::AXRole WidgetDelegate::GetAccessibleWindowRole() const { | 62 ui::AXRole WidgetDelegate::GetAccessibleWindowRole() const { |
| 61 return ui::AX_ROLE_WINDOW; | 63 return ui::AX_ROLE_WINDOW; |
| 62 } | 64 } |
| 63 | 65 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 192 |
| 191 Widget* WidgetDelegateView::GetWidget() { | 193 Widget* WidgetDelegateView::GetWidget() { |
| 192 return View::GetWidget(); | 194 return View::GetWidget(); |
| 193 } | 195 } |
| 194 | 196 |
| 195 const Widget* WidgetDelegateView::GetWidget() const { | 197 const Widget* WidgetDelegateView::GetWidget() const { |
| 196 return View::GetWidget(); | 198 return View::GetWidget(); |
| 197 } | 199 } |
| 198 | 200 |
| 199 } // namespace views | 201 } // namespace views |
| OLD | NEW |