OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHROMEOS_DISPLAY_OUTPUT_PROTECTION_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DISPLAY_OUTPUT_PROTECTION_DELEGATE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_OUTPUT_PROTECTION_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_OUTPUT_PROTECTION_DELEGATE_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
9 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
10 #include "ui/aura/window_observer.h" | 12 #include "ui/aura/window_observer.h" |
11 #include "ui/display/chromeos/display_configurator.h" | 13 #include "ui/display/chromeos/display_configurator.h" |
12 | 14 |
13 namespace chromeos { | 15 namespace chromeos { |
14 | 16 |
15 // A class to query output protection status and/or enable output protection. | 17 // A class to query output protection status and/or enable output protection. |
16 // All methods except constructor should be invoked in UI thread. | 18 // All methods except constructor should be invoked in UI thread. |
17 class OutputProtectionDelegate : public aura::WindowObserver { | 19 class OutputProtectionDelegate : public aura::WindowObserver { |
(...skipping 28 matching lines...) Expand all Loading... |
46 // Used to lookup the WebContents associated with the render frame. | 48 // Used to lookup the WebContents associated with the render frame. |
47 int render_process_id_; | 49 int render_process_id_; |
48 int render_frame_id_; | 50 int render_frame_id_; |
49 | 51 |
50 // Native window being observed. | 52 // Native window being observed. |
51 aura::Window* window_; | 53 aura::Window* window_; |
52 | 54 |
53 ui::DisplayConfigurator::ContentProtectionClientId client_id_; | 55 ui::DisplayConfigurator::ContentProtectionClientId client_id_; |
54 | 56 |
55 // The display id which the renderer currently uses. | 57 // The display id which the renderer currently uses. |
56 int64 display_id_; | 58 int64_t display_id_; |
57 | 59 |
58 // The last desired method mask. Will enable this mask on new display if | 60 // The last desired method mask. Will enable this mask on new display if |
59 // renderer changes display. | 61 // renderer changes display. |
60 uint32_t desired_method_mask_; | 62 uint32_t desired_method_mask_; |
61 | 63 |
62 base::WeakPtrFactory<OutputProtectionDelegate> weak_ptr_factory_; | 64 base::WeakPtrFactory<OutputProtectionDelegate> weak_ptr_factory_; |
63 }; | 65 }; |
64 | 66 |
65 } // namespace chromeos | 67 } // namespace chromeos |
66 | 68 |
67 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_OUTPUT_PROTECTION_DELEGATE_H_ | 69 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_OUTPUT_PROTECTION_DELEGATE_H_ |
OLD | NEW |