| 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> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // aura::WindowObserver overrides. | 30 // aura::WindowObserver overrides. |
| 31 void OnWindowHierarchyChanged( | 31 void OnWindowHierarchyChanged( |
| 32 const aura::WindowObserver::HierarchyChangeParams& params) override; | 32 const aura::WindowObserver::HierarchyChangeParams& params) override; |
| 33 void OnWindowDestroying(aura::Window* window) override; | 33 void OnWindowDestroying(aura::Window* window) override; |
| 34 | 34 |
| 35 void QueryStatus(const QueryStatusCallback& callback); | 35 void QueryStatus(const QueryStatusCallback& callback); |
| 36 void EnableProtection(uint32_t desired_method_mask, | 36 void EnableProtection(uint32_t desired_method_mask, |
| 37 const EnableProtectionCallback& callback); | 37 const EnableProtectionCallback& callback); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 ui::DisplayConfigurator::ContentProtectionClientId GetClientId(); | 40 display::DisplayConfigurator::ContentProtectionClientId GetClientId(); |
| 41 | 41 |
| 42 void QueryStatusComplete( | 42 void QueryStatusComplete( |
| 43 const QueryStatusCallback& callback, | 43 const QueryStatusCallback& callback, |
| 44 const ui::DisplayConfigurator::QueryProtectionResponse& response); | 44 const display::DisplayConfigurator::QueryProtectionResponse& response); |
| 45 void EnableProtectionComplete(const EnableProtectionCallback& callback, | 45 void EnableProtectionComplete(const EnableProtectionCallback& callback, |
| 46 bool success); | 46 bool success); |
| 47 | 47 |
| 48 // Used to lookup the WebContents associated with the render frame. | 48 // Used to lookup the WebContents associated with the render frame. |
| 49 int render_process_id_; | 49 int render_process_id_; |
| 50 int render_frame_id_; | 50 int render_frame_id_; |
| 51 | 51 |
| 52 // Native window being observed. | 52 // Native window being observed. |
| 53 aura::Window* window_; | 53 aura::Window* window_; |
| 54 | 54 |
| 55 ui::DisplayConfigurator::ContentProtectionClientId client_id_; | 55 display::DisplayConfigurator::ContentProtectionClientId client_id_; |
| 56 | 56 |
| 57 // The display id which the renderer currently uses. | 57 // The display id which the renderer currently uses. |
| 58 int64_t display_id_; | 58 int64_t display_id_; |
| 59 | 59 |
| 60 // 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 |
| 61 // renderer changes display. | 61 // renderer changes display. |
| 62 uint32_t desired_method_mask_; | 62 uint32_t desired_method_mask_; |
| 63 | 63 |
| 64 base::WeakPtrFactory<OutputProtectionDelegate> weak_ptr_factory_; | 64 base::WeakPtrFactory<OutputProtectionDelegate> weak_ptr_factory_; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace chromeos | 67 } // namespace chromeos |
| 68 | 68 |
| 69 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_OUTPUT_PROTECTION_DELEGATE_H_ | 69 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_OUTPUT_PROTECTION_DELEGATE_H_ |
| OLD | NEW |