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.h" | 5 #include "ui/views/widget/widget.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 } | 64 } |
65 | 65 |
66 } // namespace | 66 } // namespace |
67 | 67 |
68 // A default implementation of WidgetDelegate, used by Widget when no | 68 // A default implementation of WidgetDelegate, used by Widget when no |
69 // WidgetDelegate is supplied. | 69 // WidgetDelegate is supplied. |
70 class DefaultWidgetDelegate : public WidgetDelegate { | 70 class DefaultWidgetDelegate : public WidgetDelegate { |
71 public: | 71 public: |
72 DefaultWidgetDelegate(Widget* widget, const Widget::InitParams& params) | 72 DefaultWidgetDelegate(Widget* widget, const Widget::InitParams& params) |
73 : widget_(widget), | 73 : widget_(widget), |
74 can_activate_(!params.child && | 74 can_activate_(params.can_activate && !params.child && |
sky
2014/05/15 16:44:01
You need to sync with https://codereview.chromium.
mohsen
2014/05/16 15:56:09
Not needed anymore. Already handled in the above C
| |
75 params.type != Widget::InitParams::TYPE_POPUP && | 75 params.type != Widget::InitParams::TYPE_POPUP && |
76 params.type != Widget::InitParams::TYPE_DRAG) { | 76 params.type != Widget::InitParams::TYPE_DRAG) { |
77 } | 77 } |
78 virtual ~DefaultWidgetDelegate() {} | 78 virtual ~DefaultWidgetDelegate() {} |
79 | 79 |
80 // Overridden from WidgetDelegate: | 80 // Overridden from WidgetDelegate: |
81 virtual void DeleteDelegate() OVERRIDE { | 81 virtual void DeleteDelegate() OVERRIDE { |
82 delete this; | 82 delete this; |
83 } | 83 } |
84 virtual Widget* GetWidget() OVERRIDE { | 84 virtual Widget* GetWidget() OVERRIDE { |
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1511 | 1511 |
1512 //////////////////////////////////////////////////////////////////////////////// | 1512 //////////////////////////////////////////////////////////////////////////////// |
1513 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1513 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1514 | 1514 |
1515 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1515 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1516 return this; | 1516 return this; |
1517 } | 1517 } |
1518 | 1518 |
1519 } // namespace internal | 1519 } // namespace internal |
1520 } // namespace views | 1520 } // namespace views |
OLD | NEW |