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

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

Issue 610523002: linux: Fixes a racy crash by key input at termination. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_EVENT_LOOP_H_ 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_EVENT_LOOP_H_
6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_EVENT_LOOP_H_ 6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_EVENT_LOOP_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/base/glib/glib_integers.h" 9 #include "ui/base/glib/glib_integers.h"
10 10
11 typedef union _GdkEvent GdkEvent; 11 typedef union _GdkEvent GdkEvent;
12 typedef struct _GdkEventKey GdkEventKey; 12 typedef struct _GdkEventKey GdkEventKey;
13 13
14 template<typename Type> struct DefaultSingletonTraits; 14 template<typename Type> struct DefaultSingletonTraits;
15 15
16 namespace libgtk2ui { 16 namespace libgtk2ui {
17 17
18 class Gtk2EventLoop { 18 class Gtk2EventLoop {
19 public: 19 public:
20 static Gtk2EventLoop* GetInstance(); 20 static Gtk2EventLoop* GetInstance();
21 21
22 private: 22 private:
23 friend struct DefaultSingletonTraits<Gtk2EventLoop>; 23 friend struct DefaultSingletonTraits<Gtk2EventLoop>;
24 24
25 Gtk2EventLoop(); 25 Gtk2EventLoop();
26 ~Gtk2EventLoop(); 26 ~Gtk2EventLoop();
27 27
28 static void GdkEventTrampoline(GdkEvent* event, gpointer data); 28 static void DispatchGdkEvent(GdkEvent* gdk_event, gpointer);
29 29 static void ProcessGdkEventKey(const GdkEventKey& gdk_event_key);
30 void DispatchGdkEvent(GdkEvent* gdk_event);
31 void ProcessGdkEventKey(const GdkEventKey& gdk_event_key);
32 30
33 DISALLOW_COPY_AND_ASSIGN(Gtk2EventLoop); 31 DISALLOW_COPY_AND_ASSIGN(Gtk2EventLoop);
34 }; 32 };
35 33
36 } // namespace libgtk2ui 34 } // namespace libgtk2ui
37 35
38 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_EVENT_LOOP_H_ 36 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_EVENT_LOOP_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698