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

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

Issue 7273084: Change the meaning of "Widget::GetTopLevelWidget()" to mean the logical top level Window in the v... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | « views/widget/native_widget_gtk.h ('k') | views/widget/native_widget_private.h » ('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) 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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 } 847 }
848 848
849 gfx::NativeView NativeWidgetGtk::GetNativeView() const { 849 gfx::NativeView NativeWidgetGtk::GetNativeView() const {
850 return widget_; 850 return widget_;
851 } 851 }
852 852
853 gfx::NativeWindow NativeWidgetGtk::GetNativeWindow() const { 853 gfx::NativeWindow NativeWidgetGtk::GetNativeWindow() const {
854 return child_ ? NULL : GTK_WINDOW(widget_); 854 return child_ ? NULL : GTK_WINDOW(widget_);
855 } 855 }
856 856
857 Widget* NativeWidgetGtk::GetTopLevelWidget() {
858 NativeWidgetPrivate* native_widget = GetTopLevelNativeWidget(GetNativeView());
859 return native_widget ? native_widget->GetWidget() : NULL;
860 }
861
857 const ui::Compositor* NativeWidgetGtk::GetCompositor() const { 862 const ui::Compositor* NativeWidgetGtk::GetCompositor() const {
858 return compositor_.get(); 863 return compositor_.get();
859 } 864 }
860 865
861 ui::Compositor* NativeWidgetGtk::GetCompositor() { 866 ui::Compositor* NativeWidgetGtk::GetCompositor() {
862 return compositor_.get(); 867 return compositor_.get();
863 } 868 }
864 869
865 void NativeWidgetGtk::MarkLayerDirty() { 870 void NativeWidgetGtk::MarkLayerDirty() {
866 } 871 }
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2145 button_pressed = event->type == GDK_BUTTON_PRESS || 2150 button_pressed = event->type == GDK_BUTTON_PRESS ||
2146 event->type == GDK_2BUTTON_PRESS || 2151 event->type == GDK_2BUTTON_PRESS ||
2147 event->type == GDK_3BUTTON_PRESS; 2152 event->type == GDK_3BUTTON_PRESS;
2148 gdk_event_free(event); 2153 gdk_event_free(event);
2149 } 2154 }
2150 return button_pressed; 2155 return button_pressed;
2151 } 2156 }
2152 2157
2153 } // namespace internal 2158 } // namespace internal
2154 } // namespace views 2159 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/native_widget_gtk.h ('k') | views/widget/native_widget_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698