| 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 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1698 views::Event::EF_SHIFT_DOWN), | 1698 views::Event::EF_SHIFT_DOWN), |
| 1699 ((flags & views::Event::EF_ALT_DOWN) == | 1699 ((flags & views::Event::EF_ALT_DOWN) == |
| 1700 views::Event::EF_ALT_DOWN)); | 1700 views::Event::EF_ALT_DOWN)); |
| 1701 } | 1701 } |
| 1702 | 1702 |
| 1703 void AutomationProvider::GetFocusedViewID(int handle, int* view_id) { | 1703 void AutomationProvider::GetFocusedViewID(int handle, int* view_id) { |
| 1704 *view_id = -1; | 1704 *view_id = -1; |
| 1705 if (window_tracker_->ContainsHandle(handle)) { | 1705 if (window_tracker_->ContainsHandle(handle)) { |
| 1706 HWND hwnd = window_tracker_->GetResource(handle); | 1706 HWND hwnd = window_tracker_->GetResource(handle); |
| 1707 views::FocusManager* focus_manager = | 1707 views::FocusManager* focus_manager = |
| 1708 views::FocusManager::GetFocusManager(hwnd); | 1708 views::FocusManager::GetFocusManagerForNativeView(hwnd); |
| 1709 DCHECK(focus_manager); | 1709 DCHECK(focus_manager); |
| 1710 views::View* focused_view = focus_manager->GetFocusedView(); | 1710 views::View* focused_view = focus_manager->GetFocusedView(); |
| 1711 if (focused_view) | 1711 if (focused_view) |
| 1712 *view_id = focused_view->GetID(); | 1712 *view_id = focused_view->GetID(); |
| 1713 } | 1713 } |
| 1714 } | 1714 } |
| 1715 | 1715 |
| 1716 void AutomationProvider::SetWindowVisible(int handle, bool visible, | 1716 void AutomationProvider::SetWindowVisible(int handle, bool visible, |
| 1717 bool* result) { | 1717 bool* result) { |
| 1718 if (window_tracker_->ContainsHandle(handle)) { | 1718 if (window_tracker_->ContainsHandle(handle)) { |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3019 if (container) { | 3019 if (container) { |
| 3020 *count = static_cast<int>(container->GetBlockedPopupCount()); | 3020 *count = static_cast<int>(container->GetBlockedPopupCount()); |
| 3021 } else { | 3021 } else { |
| 3022 // If we don't have a container, we don't have any blocked popups to | 3022 // If we don't have a container, we don't have any blocked popups to |
| 3023 // contain! | 3023 // contain! |
| 3024 *count = 0; | 3024 *count = 0; |
| 3025 } | 3025 } |
| 3026 } | 3026 } |
| 3027 } | 3027 } |
| 3028 } | 3028 } |
| OLD | NEW |