OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
6 | 6 |
7 #include "app/message_box_flags.h" | 7 #include "app/message_box_flags.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 void TestingAutomationProvider::WindowSimulateKeyPress( | 872 void TestingAutomationProvider::WindowSimulateKeyPress( |
873 const IPC::Message& message, | 873 const IPC::Message& message, |
874 int handle, | 874 int handle, |
875 int key, | 875 int key, |
876 int flags) { | 876 int flags) { |
877 if (!window_tracker_->ContainsHandle(handle)) | 877 if (!window_tracker_->ContainsHandle(handle)) |
878 return; | 878 return; |
879 | 879 |
880 gfx::NativeWindow window = window_tracker_->GetResource(handle); | 880 gfx::NativeWindow window = window_tracker_->GetResource(handle); |
881 // The key event is sent to whatever window is active. | 881 // The key event is sent to whatever window is active. |
882 ui_controls::SendKeyPress(window, static_cast<base::KeyboardCode>(key), | 882 ui_controls::SendKeyPress(window, static_cast<app::KeyboardCode>(key), |
883 ((flags & views::Event::EF_CONTROL_DOWN) == | 883 ((flags & views::Event::EF_CONTROL_DOWN) == |
884 views::Event::EF_CONTROL_DOWN), | 884 views::Event::EF_CONTROL_DOWN), |
885 ((flags & views::Event::EF_SHIFT_DOWN) == | 885 ((flags & views::Event::EF_SHIFT_DOWN) == |
886 views::Event::EF_SHIFT_DOWN), | 886 views::Event::EF_SHIFT_DOWN), |
887 ((flags & views::Event::EF_ALT_DOWN) == | 887 ((flags & views::Event::EF_ALT_DOWN) == |
888 views::Event::EF_ALT_DOWN), | 888 views::Event::EF_ALT_DOWN), |
889 ((flags & views::Event::EF_COMMAND_DOWN) == | 889 ((flags & views::Event::EF_COMMAND_DOWN) == |
890 views::Event::EF_COMMAND_DOWN)); | 890 views::Event::EF_COMMAND_DOWN)); |
891 } | 891 } |
892 | 892 |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1964 DCHECK(type == NotificationType::SESSION_END); | 1964 DCHECK(type == NotificationType::SESSION_END); |
1965 // OnBrowserRemoving does a ReleaseLater. When session end is received we exit | 1965 // OnBrowserRemoving does a ReleaseLater. When session end is received we exit |
1966 // before the task runs resulting in this object not being deleted. This | 1966 // before the task runs resulting in this object not being deleted. This |
1967 // Release balance out the Release scheduled by OnBrowserRemoving. | 1967 // Release balance out the Release scheduled by OnBrowserRemoving. |
1968 Release(); | 1968 Release(); |
1969 } | 1969 } |
1970 | 1970 |
1971 void TestingAutomationProvider::OnRemoveProvider() { | 1971 void TestingAutomationProvider::OnRemoveProvider() { |
1972 AutomationProviderList::GetInstance()->RemoveProvider(this); | 1972 AutomationProviderList::GetInstance()->RemoveProvider(this); |
1973 } | 1973 } |
OLD | NEW |