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

Side by Side Diff: chrome/browser/platform_util_common_linux.cc

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/platform_util.h"
6
7 #include <gtk/gtk.h>
8
9 namespace platform_util {
10
11 gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
12 // A detached widget won't have a toplevel window as an ancestor, so we can't
13 // assume that the query for toplevel will return a window.
14 GtkWidget* toplevel = gtk_widget_get_ancestor(view, GTK_TYPE_WINDOW);
15 return GTK_IS_WINDOW(toplevel) ? GTK_WINDOW(toplevel) : NULL;
16 }
17
18 gfx::NativeView GetParent(gfx::NativeView view) {
19 return gtk_widget_get_parent(view);
20 }
21
22 bool IsWindowActive(gfx::NativeWindow window) {
23 return gtk_window_is_active(window);
24 }
25
26 void ActivateWindow(gfx::NativeWindow window) {
27 gtk_window_present(window);
28 }
29
30 bool IsVisible(gfx::NativeView view) {
31 return gtk_widget_get_visible(view);
32 }
33
34 } // namespace platform_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698