OLD | NEW |
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_RENDERER_HOST_PEPPER_MONITOR_FINDER_MAC_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_MONITOR_FINDER_MAC_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_MONITOR_FINDER_MAC_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_MONITOR_FINDER_MAC_H_ |
7 | 7 |
8 #include <ApplicationServices/ApplicationServices.h> | 8 #include <ApplicationServices/ApplicationServices.h> |
| 9 #include <stdint.h> |
9 | 10 |
| 11 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
11 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
12 | 14 |
13 namespace chrome { | 15 namespace chrome { |
14 | 16 |
15 // MonitorFinder maps a RenderFrameHost to the display ID on which the widget | 17 // MonitorFinder maps a RenderFrameHost to the display ID on which the widget |
16 // is painting. This class operates on the IO thread while the RenderFrameHost | 18 // is painting. This class operates on the IO thread while the RenderFrameHost |
17 // is on the UI thread, so the value returned by GetMonitor() may be 0 until | 19 // is on the UI thread, so the value returned by GetMonitor() may be 0 until |
18 // the information can be retrieved asynchronously. | 20 // the information can be retrieved asynchronously. |
19 class MonitorFinder : public base::RefCountedThreadSafe<MonitorFinder> { | 21 class MonitorFinder : public base::RefCountedThreadSafe<MonitorFinder> { |
(...skipping 21 matching lines...) Expand all Loading... |
41 bool request_sent_; | 43 bool request_sent_; |
42 // The native display ID for the RenderFrameHost. | 44 // The native display ID for the RenderFrameHost. |
43 CGDirectDisplayID display_id_; | 45 CGDirectDisplayID display_id_; |
44 | 46 |
45 DISALLOW_COPY_AND_ASSIGN(MonitorFinder); | 47 DISALLOW_COPY_AND_ASSIGN(MonitorFinder); |
46 }; | 48 }; |
47 | 49 |
48 } // namespace chrome | 50 } // namespace chrome |
49 | 51 |
50 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_MONITOR_FINDER_H_ | 52 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_MONITOR_FINDER_H_ |
OLD | NEW |