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

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

Issue 12036094: Fix crash on spell check "Ask Google for suggestions" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
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/string_util.h" 8 #include "base/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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return gfx::Font(caption_font); 87 return gfx::Font(caption_font);
88 #else 88 #else
89 return gfx::Font(); 89 return gfx::Font();
90 #endif 90 #endif
91 } 91 }
92 92
93 //////////////////////////////////////////////////////////////////////////////// 93 ////////////////////////////////////////////////////////////////////////////////
94 // NativeWidgetAura, internal::NativeWidgetPrivate implementation: 94 // NativeWidgetAura, internal::NativeWidgetPrivate implementation:
95 95
96 void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { 96 void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
97 // Aura needs to know which desktop (Ash or regular) will manage this widget.
98 // See Widget::InitParams::context for details.
99 DCHECK(params.parent || params.context);
stevenjb 2013/01/24 23:32:33 nit: Since now at least two devs have been bitten
100
97 ownership_ = params.ownership; 101 ownership_ = params.ownership;
98 102
99 window_->set_user_data(this); 103 window_->set_user_data(this);
100 window_->SetType(GetAuraWindowTypeForWidgetType(params.type)); 104 window_->SetType(GetAuraWindowTypeForWidgetType(params.type));
101 window_->SetProperty(aura::client::kShowStateKey, params.show_state); 105 window_->SetProperty(aura::client::kShowStateKey, params.show_state);
102 if (params.type == Widget::InitParams::TYPE_BUBBLE) 106 if (params.type == Widget::InitParams::TYPE_BUBBLE)
103 aura::client::SetHideOnDeactivate(window_, true); 107 aura::client::SetHideOnDeactivate(window_, true);
104 window_->SetTransparent(params.transparent); 108 window_->SetTransparent(params.transparent);
105 window_->Init(params.layer_type); 109 window_->Init(params.layer_type);
106 if (params.type == Widget::InitParams::TYPE_CONTROL) 110 if (params.type == Widget::InitParams::TYPE_CONTROL)
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 return aura::Env::GetInstance()->is_mouse_button_down(); 1054 return aura::Env::GetInstance()->is_mouse_button_down();
1051 } 1055 }
1052 1056
1053 // static 1057 // static
1054 bool NativeWidgetPrivate::IsTouchDown() { 1058 bool NativeWidgetPrivate::IsTouchDown() {
1055 return aura::Env::GetInstance()->is_touch_down(); 1059 return aura::Env::GetInstance()->is_touch_down();
1056 } 1060 }
1057 1061
1058 } // namespace internal 1062 } // namespace internal
1059 } // namespace views 1063 } // namespace views
OLDNEW
« chrome/browser/ui/views/confirm_bubble_views_unittest.cc ('K') | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698