Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: chrome/browser/automation/automation_provider.cc

Issue 146093: Relanding focus manager refactoring (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698