summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-11 23:35:34 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-11 23:35:34 +0000
commit0defef3a20f196c421889c2df006db4b9996f62a (patch)
tree5e51fadbe442f414ab1ac73692238d39d5c9c2ff /views
parent1cbfb3b5b58c4eded47cc6aceaf5ace214f2a4f2 (diff)
downloadchromium_src-0defef3a20f196c421889c2df006db4b9996f62a.zip
chromium_src-0defef3a20f196c421889c2df006db4b9996f62a.tar.gz
chromium_src-0defef3a20f196c421889c2df006db4b9996f62a.tar.bz2
Relanding this with the compile fixes for Linux views
Revert 92074 - Revert 92071 - Fix a chrome browser crash which occurs when displaying the page info bubble in a ChromeFrame page. The crash occurs while dereferencing a NULL NonClientView member in the widget code. This member is only instantiated if the widget is of type InitParams::TYPE_WINDOW. ChromeFrame always instantiates as a popup window and hence this member is always NULL. Fix is to add a NULL check at the relevant places in the widget code. Fixes bug http://code.google.com/p/chromium/issues/detail?id=88960 BUG=88960 Review URL: http://codereview.chromium.org/7301028 TBR=ananta@chromium.org Review URL: http://codereview.chromium.org/7258008 TBR=ananta@chromium.org Review URL: http://codereview.chromium.org/7340007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92078 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/widget/widget.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/views/widget/widget.cc b/views/widget/widget.cc
index 51bafb0..d309917 100644
--- a/views/widget/widget.cc
+++ b/views/widget/widget.cc
@@ -405,7 +405,8 @@ void Widget::CloseNow() {
}
void Widget::EnableClose(bool enable) {
- non_client_view_->EnableClose(enable);
+ if (non_client_view_)
+ non_client_view_->EnableClose(enable);
native_widget_->EnableClose(enable);
}
@@ -446,7 +447,8 @@ bool Widget::IsActive() const {
void Widget::DisableInactiveRendering() {
disable_inactive_rendering_ = true;
- non_client_view_->DisableInactiveRendering(disable_inactive_rendering_);
+ if (non_client_view_)
+ non_client_view_->DisableInactiveRendering(disable_inactive_rendering_);
}
void Widget::SetAlwaysOnTop(bool on_top) {
@@ -598,7 +600,8 @@ void Widget::UpdateWindowTitle() {
}
void Widget::UpdateWindowIcon() {
- non_client_view_->UpdateWindowIcon();
+ if (non_client_view_)
+ non_client_view_->UpdateWindowIcon();
native_widget_->SetWindowIcons(widget_delegate_->GetWindowIcon(),
widget_delegate_->GetWindowAppIcon());
}
@@ -727,7 +730,8 @@ bool Widget::IsInactiveRenderingDisabled() const {
void Widget::EnableInactiveRendering() {
disable_inactive_rendering_ = false;
- non_client_view_->DisableInactiveRendering(false);
+ if (non_client_view_)
+ non_client_view_->DisableInactiveRendering(false);
}
void Widget::OnNativeWidgetActivationChanged(bool active) {
@@ -815,7 +819,7 @@ void Widget::OnNativeWidgetPaint(gfx::Canvas* canvas) {
}
int Widget::GetNonClientComponent(const gfx::Point& point) {
- return non_client_view_->NonClientHitTest(point);
+ return non_client_view_ ? non_client_view_->NonClientHitTest(point) : 0;
}
bool Widget::OnKeyEvent(const KeyEvent& event) {