| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "chrome/browser/win/settings_app_monitor.h" | 5 #include "chrome/browser/win/settings_app_monitor.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 #include <oleauto.h> | 9 #include <oleauto.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 obj->QueryInterface(event_handler_.GetAddressOf()); | 727 obj->QueryInterface(event_handler_.GetAddressOf()); |
| 728 } | 728 } |
| 729 } | 729 } |
| 730 return event_handler_; | 730 return event_handler_; |
| 731 } | 731 } |
| 732 | 732 |
| 733 base::win::ScopedComPtr<IUIAutomationEventHandler> | 733 base::win::ScopedComPtr<IUIAutomationEventHandler> |
| 734 SettingsAppMonitor::Context::GetAutomationEventHandler() { | 734 SettingsAppMonitor::Context::GetAutomationEventHandler() { |
| 735 DCHECK(task_runner_->BelongsToCurrentThread()); | 735 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 736 base::win::ScopedComPtr<IUIAutomationEventHandler> handler; | 736 base::win::ScopedComPtr<IUIAutomationEventHandler> handler; |
| 737 handler.QueryFrom(GetEventHandler().Get()); | 737 GetEventHandler().CopyTo(handler.GetAddressOf()); |
| 738 return handler; | 738 return handler; |
| 739 } | 739 } |
| 740 | 740 |
| 741 base::win::ScopedComPtr<IUIAutomationFocusChangedEventHandler> | 741 base::win::ScopedComPtr<IUIAutomationFocusChangedEventHandler> |
| 742 SettingsAppMonitor::Context::GetFocusChangedEventHandler() { | 742 SettingsAppMonitor::Context::GetFocusChangedEventHandler() { |
| 743 DCHECK(task_runner_->BelongsToCurrentThread()); | 743 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 744 base::win::ScopedComPtr<IUIAutomationFocusChangedEventHandler> handler; | 744 base::win::ScopedComPtr<IUIAutomationFocusChangedEventHandler> handler; |
| 745 handler.QueryFrom(GetEventHandler().Get()); | 745 GetEventHandler().CopyTo(handler.GetAddressOf()); |
| 746 return handler; | 746 return handler; |
| 747 } | 747 } |
| 748 | 748 |
| 749 HRESULT SettingsAppMonitor::Context::InstallObservers() { | 749 HRESULT SettingsAppMonitor::Context::InstallObservers() { |
| 750 DCHECK(task_runner_->BelongsToCurrentThread()); | 750 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 751 DCHECK(automation_); | 751 DCHECK(automation_); |
| 752 | 752 |
| 753 // Create a cache request so that elements received by way of events contain | 753 // Create a cache request so that elements received by way of events contain |
| 754 // all data needed for procesing. | 754 // all data needed for procesing. |
| 755 base::win::ScopedComPtr<IUIAutomationCacheRequest> cache_request; | 755 base::win::ScopedComPtr<IUIAutomationCacheRequest> cache_request; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 delegate_->OnPromoFocused(); | 835 delegate_->OnPromoFocused(); |
| 836 } | 836 } |
| 837 | 837 |
| 838 void SettingsAppMonitor::OnPromoChoiceMade(bool accept_promo) { | 838 void SettingsAppMonitor::OnPromoChoiceMade(bool accept_promo) { |
| 839 DCHECK(thread_checker_.CalledOnValidThread()); | 839 DCHECK(thread_checker_.CalledOnValidThread()); |
| 840 delegate_->OnPromoChoiceMade(accept_promo); | 840 delegate_->OnPromoChoiceMade(accept_promo); |
| 841 } | 841 } |
| 842 | 842 |
| 843 } // namespace win | 843 } // namespace win |
| 844 } // namespace shell_integration | 844 } // namespace shell_integration |
| OLD | NEW |