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

Side by Side Diff: ui/events/platform/x11/x11_event_source_glib.cc

Issue 683553002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « ui/events/platform/x11/x11_event_source.h ('k') | ui/events/x/device_data_manager_x11.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 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 #include "ui/events/platform/x11/x11_event_source.h" 5 #include "ui/events/platform/x11/x11_event_source.h"
6 6
7 #include <glib.h> 7 #include <glib.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 namespace ui { 10 namespace ui {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 }; 48 };
49 49
50 class X11EventSourceGlib : public X11EventSource { 50 class X11EventSourceGlib : public X11EventSource {
51 public: 51 public:
52 explicit X11EventSourceGlib(XDisplay* display) 52 explicit X11EventSourceGlib(XDisplay* display)
53 : X11EventSource(display), 53 : X11EventSource(display),
54 x_source_(NULL) { 54 x_source_(NULL) {
55 InitXSource(ConnectionNumber(display)); 55 InitXSource(ConnectionNumber(display));
56 } 56 }
57 57
58 virtual ~X11EventSourceGlib() { 58 ~X11EventSourceGlib() override {
59 g_source_destroy(x_source_); 59 g_source_destroy(x_source_);
60 g_source_unref(x_source_); 60 g_source_unref(x_source_);
61 } 61 }
62 62
63 private: 63 private:
64 void InitXSource(int fd) { 64 void InitXSource(int fd) {
65 CHECK(!x_source_); 65 CHECK(!x_source_);
66 CHECK(display()) << "Unable to get connection to X server"; 66 CHECK(display()) << "Unable to get connection to X server";
67 67
68 x_poll_.reset(new GPollFD()); 68 x_poll_.reset(new GPollFD());
(...skipping 23 matching lines...) Expand all
92 }; 92 };
93 93
94 } // namespace 94 } // namespace
95 95
96 scoped_ptr<PlatformEventSource> PlatformEventSource::CreateDefault() { 96 scoped_ptr<PlatformEventSource> PlatformEventSource::CreateDefault() {
97 return scoped_ptr<PlatformEventSource>( 97 return scoped_ptr<PlatformEventSource>(
98 new X11EventSourceGlib(gfx::GetXDisplay())); 98 new X11EventSourceGlib(gfx::GetXDisplay()));
99 } 99 }
100 100
101 } // namespace ui 101 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/platform/x11/x11_event_source.h ('k') | ui/events/x/device_data_manager_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698