| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/automation/automation_provider.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/message_box_flags.h" | 8 #include "app/message_box_flags.h" |
| 9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
| 10 #include "base/json_reader.h" | 10 #include "base/json_reader.h" |
| (...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 views::Event::EF_SHIFT_DOWN), | 1722 views::Event::EF_SHIFT_DOWN), |
| 1723 ((flags & views::Event::EF_ALT_DOWN) == | 1723 ((flags & views::Event::EF_ALT_DOWN) == |
| 1724 views::Event::EF_ALT_DOWN)); | 1724 views::Event::EF_ALT_DOWN)); |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 void AutomationProvider::GetFocusedViewID(int handle, int* view_id) { | 1727 void AutomationProvider::GetFocusedViewID(int handle, int* view_id) { |
| 1728 *view_id = -1; | 1728 *view_id = -1; |
| 1729 if (window_tracker_->ContainsHandle(handle)) { | 1729 if (window_tracker_->ContainsHandle(handle)) { |
| 1730 HWND hwnd = window_tracker_->GetResource(handle); | 1730 HWND hwnd = window_tracker_->GetResource(handle); |
| 1731 views::FocusManager* focus_manager = | 1731 views::FocusManager* focus_manager = |
| 1732 views::FocusManager::GetFocusManagerForNativeView(hwnd); | 1732 views::FocusManager::GetFocusManager(hwnd); |
| 1733 DCHECK(focus_manager); | 1733 DCHECK(focus_manager); |
| 1734 views::View* focused_view = focus_manager->GetFocusedView(); | 1734 views::View* focused_view = focus_manager->GetFocusedView(); |
| 1735 if (focused_view) | 1735 if (focused_view) |
| 1736 *view_id = focused_view->GetID(); | 1736 *view_id = focused_view->GetID(); |
| 1737 } | 1737 } |
| 1738 } | 1738 } |
| 1739 | 1739 |
| 1740 void AutomationProvider::SetWindowVisible(int handle, bool visible, | 1740 void AutomationProvider::SetWindowVisible(int handle, bool visible, |
| 1741 bool* result) { | 1741 bool* result) { |
| 1742 if (window_tracker_->ContainsHandle(handle)) { | 1742 if (window_tracker_->ContainsHandle(handle)) { |
| (...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3042 if (container) { | 3042 if (container) { |
| 3043 *count = static_cast<int>(container->GetBlockedPopupCount()); | 3043 *count = static_cast<int>(container->GetBlockedPopupCount()); |
| 3044 } else { | 3044 } else { |
| 3045 // If we don't have a container, we don't have any blocked popups to | 3045 // If we don't have a container, we don't have any blocked popups to |
| 3046 // contain! | 3046 // contain! |
| 3047 *count = 0; | 3047 *count = 0; |
| 3048 } | 3048 } |
| 3049 } | 3049 } |
| 3050 } | 3050 } |
| 3051 } | 3051 } |
| OLD | NEW |