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

Side by Side Diff: views/widget/native_widget_gtk.cc

Issue 7529031: NativeWidgetPrivate::CreateNativeWidget should check for NULL on views_delegate (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: patch Created 9 years, 4 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 | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/widget/native_widget_gtk.h" 5 #include "views/widget/native_widget_gtk.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkx.h> 8 #include <gdk/gdkx.h>
9 #include <X11/extensions/shape.h> 9 #include <X11/extensions/shape.h>
10 #include <X11/Xatom.h> 10 #include <X11/Xatom.h>
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2137 } 2137 }
2138 2138
2139 namespace internal { 2139 namespace internal {
2140 2140
2141 //////////////////////////////////////////////////////////////////////////////// 2141 ////////////////////////////////////////////////////////////////////////////////
2142 // NativeWidgetPrivate, public: 2142 // NativeWidgetPrivate, public:
2143 2143
2144 // static 2144 // static
2145 NativeWidgetPrivate* NativeWidgetPrivate::CreateNativeWidget( 2145 NativeWidgetPrivate* NativeWidgetPrivate::CreateNativeWidget(
2146 NativeWidgetDelegate* delegate) { 2146 NativeWidgetDelegate* delegate) {
2147 if (Widget::IsPureViews() && 2147 if (Widget::IsPureViews() && ViewsDelegate::views_delegate &&
2148 ViewsDelegate::views_delegate->GetDefaultParentView()) { 2148 ViewsDelegate::views_delegate->GetDefaultParentView()) {
2149 return new NativeWidgetViews(delegate); 2149 return new NativeWidgetViews(delegate);
2150 } 2150 }
2151 return new NativeWidgetGtk(delegate); 2151 return new NativeWidgetGtk(delegate);
2152 } 2152 }
2153 2153
2154 // static 2154 // static
2155 NativeWidgetPrivate* NativeWidgetPrivate::GetNativeWidgetForNativeView( 2155 NativeWidgetPrivate* NativeWidgetPrivate::GetNativeWidgetForNativeView(
2156 gfx::NativeView native_view) { 2156 gfx::NativeView native_view) {
2157 if (!native_view) 2157 if (!native_view)
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 button_pressed = event->type == GDK_BUTTON_PRESS || 2245 button_pressed = event->type == GDK_BUTTON_PRESS ||
2246 event->type == GDK_2BUTTON_PRESS || 2246 event->type == GDK_2BUTTON_PRESS ||
2247 event->type == GDK_3BUTTON_PRESS; 2247 event->type == GDK_3BUTTON_PRESS;
2248 gdk_event_free(event); 2248 gdk_event_free(event);
2249 } 2249 }
2250 return button_pressed; 2250 return button_pressed;
2251 } 2251 }
2252 2252
2253 } // namespace internal 2253 } // namespace internal
2254 } // namespace views 2254 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698