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/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 void TestingAutomationProvider::WindowSimulateKeyPress( | 862 void TestingAutomationProvider::WindowSimulateKeyPress( |
863 const IPC::Message& message, | 863 const IPC::Message& message, |
864 int handle, | 864 int handle, |
865 int key, | 865 int key, |
866 int flags) { | 866 int flags) { |
867 if (!window_tracker_->ContainsHandle(handle)) | 867 if (!window_tracker_->ContainsHandle(handle)) |
868 return; | 868 return; |
869 | 869 |
870 gfx::NativeWindow window = window_tracker_->GetResource(handle); | 870 gfx::NativeWindow window = window_tracker_->GetResource(handle); |
871 // The key event is sent to whatever window is active. | 871 // The key event is sent to whatever window is active. |
872 ui_controls::SendKeyPress(window, static_cast<app::KeyboardCode>(key), | 872 ui_controls::SendKeyPress(window, static_cast<ui::KeyboardCode>(key), |
873 ((flags & views::Event::EF_CONTROL_DOWN) == | 873 ((flags & views::Event::EF_CONTROL_DOWN) == |
874 views::Event::EF_CONTROL_DOWN), | 874 views::Event::EF_CONTROL_DOWN), |
875 ((flags & views::Event::EF_SHIFT_DOWN) == | 875 ((flags & views::Event::EF_SHIFT_DOWN) == |
876 views::Event::EF_SHIFT_DOWN), | 876 views::Event::EF_SHIFT_DOWN), |
877 ((flags & views::Event::EF_ALT_DOWN) == | 877 ((flags & views::Event::EF_ALT_DOWN) == |
878 views::Event::EF_ALT_DOWN), | 878 views::Event::EF_ALT_DOWN), |
879 ((flags & views::Event::EF_COMMAND_DOWN) == | 879 ((flags & views::Event::EF_COMMAND_DOWN) == |
880 views::Event::EF_COMMAND_DOWN)); | 880 views::Event::EF_COMMAND_DOWN)); |
881 } | 881 } |
882 | 882 |
(...skipping 3634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4517 // If you change this, update Observer for NotificationType::SESSION_END | 4517 // If you change this, update Observer for NotificationType::SESSION_END |
4518 // below. | 4518 // below. |
4519 MessageLoop::current()->PostTask(FROM_HERE, | 4519 MessageLoop::current()->PostTask(FROM_HERE, |
4520 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); | 4520 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); |
4521 } | 4521 } |
4522 } | 4522 } |
4523 | 4523 |
4524 void TestingAutomationProvider::OnRemoveProvider() { | 4524 void TestingAutomationProvider::OnRemoveProvider() { |
4525 AutomationProviderList::GetInstance()->RemoveProvider(this); | 4525 AutomationProviderList::GetInstance()->RemoveProvider(this); |
4526 } | 4526 } |
OLD | NEW |