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

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

Issue 23483041: [Cleanup] Remove mac code from aura/ash/views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/drop_helper.cc ('k') | ui/views/widget/widget.cc » ('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) 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/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_client.h" 10 #include "ui/aura/client/activation_client.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // state/bounds). 162 // state/bounds).
163 if (IsMaximized()) 163 if (IsMaximized())
164 SetRestoreBounds(window_, window_bounds); 164 SetRestoreBounds(window_, window_bounds);
165 else 165 else
166 SetBounds(window_bounds); 166 SetBounds(window_bounds);
167 window_->set_ignore_events(!params.accept_events); 167 window_->set_ignore_events(!params.accept_events);
168 can_activate_ = params.can_activate && 168 can_activate_ = params.can_activate &&
169 params.type != Widget::InitParams::TYPE_CONTROL && 169 params.type != Widget::InitParams::TYPE_CONTROL &&
170 params.type != Widget::InitParams::TYPE_TOOLTIP; 170 params.type != Widget::InitParams::TYPE_TOOLTIP;
171 DCHECK(GetWidget()->GetRootView()); 171 DCHECK(GetWidget()->GetRootView());
172 #if !defined(OS_MACOSX)
173 if (params.type != Widget::InitParams::TYPE_TOOLTIP) 172 if (params.type != Widget::InitParams::TYPE_TOOLTIP)
174 tooltip_manager_.reset(new views::TooltipManagerAura(window_, GetWidget())); 173 tooltip_manager_.reset(new views::TooltipManagerAura(window_, GetWidget()));
175 #endif // !defined(OS_MACOSX)
176 174
177 drop_helper_.reset(new DropHelper(GetWidget()->GetRootView())); 175 drop_helper_.reset(new DropHelper(GetWidget()->GetRootView()));
178 if (params.type != Widget::InitParams::TYPE_TOOLTIP && 176 if (params.type != Widget::InitParams::TYPE_TOOLTIP &&
179 params.type != Widget::InitParams::TYPE_POPUP) { 177 params.type != Widget::InitParams::TYPE_POPUP) {
180 aura::client::SetDragDropDelegate(window_, this); 178 aura::client::SetDragDropDelegate(window_, this);
181 } 179 }
182 180
183 aura::client::SetActivationDelegate(window_, this); 181 aura::client::SetActivationDelegate(window_, this);
184 182
185 window_->SetProperty(aura::client::kCanMaximizeKey, 183 window_->SetProperty(aura::client::kCanMaximizeKey,
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 return aura::Env::GetInstance()->is_mouse_button_down(); 1126 return aura::Env::GetInstance()->is_mouse_button_down();
1129 } 1127 }
1130 1128
1131 // static 1129 // static
1132 bool NativeWidgetPrivate::IsTouchDown() { 1130 bool NativeWidgetPrivate::IsTouchDown() {
1133 return aura::Env::GetInstance()->is_touch_down(); 1131 return aura::Env::GetInstance()->is_touch_down();
1134 } 1132 }
1135 1133
1136 } // namespace internal 1134 } // namespace internal
1137 } // namespace views 1135 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/drop_helper.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698