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

Side by Side Diff: ui/base/win/singleton_hwnd.h

Issue 9370026: Respect the system ClearType setting in RenderTextWin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | ui/base/win/singleton_hwnd.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_BASE_WIN_SINGLETON_HWND_H_
6 #define UI_BASE_WIN_SINGLETON_HWND_H_
7 #pragma once
8
9 #include <windows.h>
10 #include <vector>
11
12 #include "base/basictypes.h"
13 #include "base/callback_forward.h"
14 #include "base/observer_list.h"
15
16 template<typename T> struct DefaultSingletonTraits;
17
18 namespace ui {
19
20 // Singleton message-only HWND that allows interested clients to receive WM_*
21 // notifications.
22 class SingletonHwnd {
23 public:
24 static SingletonHwnd* GetInstance();
25
26 // Observer interface for receiving Windows WM_* notifications.
27 class Observer {
28 public:
29 virtual void OnWndProc(HWND hwnd,
30 UINT message,
31 WPARAM wparam,
32 LPARAM lparam) = 0;
33 };
34
35 // Add/remove observer to receive WM_* notifications.
36 void AddObserver(Observer* observer);
37 void RemoveObserver(Observer* observer);
38
39 // Windows callback for WM_* notifications.
40 void OnWndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
41
42 private:
43 friend struct DefaultSingletonTraits<SingletonHwnd>;
44
45 SingletonHwnd();
46 ~SingletonHwnd();
47
48 // Listener HWND for WM_* notifications.
49 HWND listener_window_;
50
51 // List of registered observers.
52 ObserverList<Observer> observer_list_;
53
54 DISALLOW_COPY_AND_ASSIGN(SingletonHwnd);
55 };
56
57 } // namespace ui
58
59 #endif // UI_BASE_WIN_SINGLETON_HWND_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/win/singleton_hwnd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698