Chromium Code Reviews

Side by Side Diff: chrome/common/native_window_notification_source.h

Issue 273017: Move native_widget_types and gtk_native_view_id_manager from base/gfx to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « chrome/common/common_param_traits.h ('k') | chrome/common/platform_util.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_COMMON_NATIVE_WINDOW_NOTIFICATION_SOURCE_H_ 5 #ifndef CHROME_COMMON_NATIVE_WINDOW_NOTIFICATION_SOURCE_H_
6 #define CHROME_COMMON_NATIVE_WINDOW_NOTIFICATION_SOURCE_H_ 6 #define CHROME_COMMON_NATIVE_WINDOW_NOTIFICATION_SOURCE_H_
7 7
8 #include "base/gfx/native_widget_types.h" 8 #include "app/gfx/native_widget_types.h"
9 #include "chrome/common/notification_source.h" 9 #include "chrome/common/notification_source.h"
10 10
11 // Specialization of the Source class for native windows. On Windows, these are 11 // Specialization of the Source class for native windows. On Windows, these are
12 // HWNDs rather than pointers, and since the Source class expects a pointer 12 // HWNDs rather than pointers, and since the Source class expects a pointer
13 // type, this is necessary. On Mac/Linux, these are pointers, so this is 13 // type, this is necessary. On Mac/Linux, these are pointers, so this is
14 // unnecessary but harmless. 14 // unnecessary but harmless.
15 template<> 15 template<>
16 class Source<gfx::NativeWindow> : public NotificationSource { 16 class Source<gfx::NativeWindow> : public NotificationSource {
17 public: 17 public:
18 explicit Source(gfx::NativeWindow wnd) : NotificationSource(wnd) {} 18 explicit Source(gfx::NativeWindow wnd) : NotificationSource(wnd) {}
19 19
20 explicit Source(const NotificationSource& other) 20 explicit Source(const NotificationSource& other)
21 : NotificationSource(other) {} 21 : NotificationSource(other) {}
22 22
23 gfx::NativeWindow operator->() const { return ptr(); } 23 gfx::NativeWindow operator->() const { return ptr(); }
24 gfx::NativeWindow ptr() const { 24 gfx::NativeWindow ptr() const {
25 return static_cast<gfx::NativeWindow>(const_cast<void*>(ptr_)); 25 return static_cast<gfx::NativeWindow>(const_cast<void*>(ptr_));
26 } 26 }
27 }; 27 };
28 28
29 #endif // CHROME_COMMON_NATIVE_WINDOW_NOTIFICATION_SOURCE_H_ 29 #endif // CHROME_COMMON_NATIVE_WINDOW_NOTIFICATION_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/common/common_param_traits.h ('k') | chrome/common/platform_util.h » ('j') | no next file with comments »

Powered by Google App Engine