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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_util.h

Issue 1624793002: Make File-Picker modal on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [WIP] use of scoped_ptr<ScopedHandle> Created 4 years, 9 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
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 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_ 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_
6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_ 6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include <string> 9 #include <string>
10 10
11 #include "ui/native_theme/native_theme.h" 11 #include "ui/native_theme/native_theme.h"
12 12
13 class SkBitmap; 13 class SkBitmap;
14 14
15 namespace aura { 15 namespace aura {
16 class Window; 16 class Window;
17 } 17 }
18 18
19 namespace base { 19 namespace base {
20 class CommandLine; 20 class CommandLine;
21 class Environment; 21 class Environment;
22 } 22 }
23 23
24 namespace ui { 24 namespace ui {
25 class Accelerator; 25 class Accelerator;
26 } 26 }
27 27
28 namespace views{
29 class DesktopWindowTreeHostX11;
30 }
31
28 namespace libgtk2ui { 32 namespace libgtk2ui {
29 33
30 void GtkInitFromCommandLine(const base::CommandLine& command_line); 34 void GtkInitFromCommandLine(const base::CommandLine& command_line);
31 35
32 // Returns the name of the ".desktop" file associated with our running process. 36 // Returns the name of the ".desktop" file associated with our running process.
33 std::string GetDesktopName(base::Environment* env); 37 std::string GetDesktopName(base::Environment* env);
34 38
35 guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator); 39 guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator);
36 40
37 GdkModifierType GetGdkModifierForAccelerator( 41 GdkModifierType GetGdkModifierForAccelerator(
38 const ui::Accelerator& accelerator); 42 const ui::Accelerator& accelerator);
39 43
40 // Translates event flags into plaform independent event flags. 44 // Translates event flags into plaform independent event flags.
41 int EventFlagsFromGdkState(guint state); 45 int EventFlagsFromGdkState(guint state);
42 46
43 // Style a GTK button as a BlueButton 47 // Style a GTK button as a BlueButton
44 void TurnButtonBlue(GtkWidget* button); 48 void TurnButtonBlue(GtkWidget* button);
45 49
46 // Sets |dialog| as transient for |parent|, which will keep it on top and center 50 // Sets |dialog| as transient for |parent|, which will keep it on top and center
47 // it above |parent|. Do nothing if |parent| is NULL. 51 // it above |parent|. Do nothing if |parent| is NULL.
48 void SetGtkTransientForAura(GtkWidget* dialog, aura::Window* parent); 52 void SetGtkTransientForAura(GtkWidget* dialog, aura::Window* parent);
49 53
50 // Gets the transient parent aura window for |dialog|. 54 // Gets the transient parent aura window for |dialog|.
51 aura::Window* GetAuraTransientParent(GtkWidget* dialog); 55 aura::Window* GetAuraTransientParent(GtkWidget* dialog);
52 56
53 // Clears the transient parent for |dialog|. 57 // Clears the transient parent for |dialog|.
54 void ClearAuraTransientParent(GtkWidget* dialog); 58 void ClearAuraTransientParent(GtkWidget* dialog);
55 59
60 // Sets the |host| as a property of |dialog|.
61 void SetDesktopWindowTreeHost(GtkWidget* dialog,
62 views::DesktopWindowTreeHostX11* host);
63
64 // Sets the |host| as a property of |dialog|.
65 void SetDesktopWindowTreeHost(GtkWidget* dialog,
66 views::DesktopWindowTreeHostX11* host);
67
68 // Gets the DesktopWindowTreeHostX11 for |dialog|.
69 views::DesktopWindowTreeHostX11* GetDesktopWindowTreeHost(GtkWidget* dialog);
70
71
56 } // namespace libgtk2ui 72 } // namespace libgtk2ui
57 73
58 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_ 74 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/libgtk2ui/gtk2_util.cc » ('j') | chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698