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

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

Issue 3165064: Move the keyboard files from base/ to app/. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: latest merge Created 10 years, 4 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
OLDNEW
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_dll_resource.h" 9 #include "chrome/app/chrome_dll_resource.h"
10 #include "chrome/browser/autocomplete/autocomplete_edit.h" 10 #include "chrome/browser/autocomplete/autocomplete_edit.h"
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 void TestingAutomationProvider::WindowSimulateKeyPress( 758 void TestingAutomationProvider::WindowSimulateKeyPress(
759 const IPC::Message& message, 759 const IPC::Message& message,
760 int handle, 760 int handle,
761 int key, 761 int key,
762 int flags) { 762 int flags) {
763 if (!window_tracker_->ContainsHandle(handle)) 763 if (!window_tracker_->ContainsHandle(handle))
764 return; 764 return;
765 765
766 gfx::NativeWindow window = window_tracker_->GetResource(handle); 766 gfx::NativeWindow window = window_tracker_->GetResource(handle);
767 // The key event is sent to whatever window is active. 767 // The key event is sent to whatever window is active.
768 ui_controls::SendKeyPress(window, static_cast<base::KeyboardCode>(key), 768 ui_controls::SendKeyPress(window, static_cast<app::KeyboardCode>(key),
769 ((flags & views::Event::EF_CONTROL_DOWN) == 769 ((flags & views::Event::EF_CONTROL_DOWN) ==
770 views::Event::EF_CONTROL_DOWN), 770 views::Event::EF_CONTROL_DOWN),
771 ((flags & views::Event::EF_SHIFT_DOWN) == 771 ((flags & views::Event::EF_SHIFT_DOWN) ==
772 views::Event::EF_SHIFT_DOWN), 772 views::Event::EF_SHIFT_DOWN),
773 ((flags & views::Event::EF_ALT_DOWN) == 773 ((flags & views::Event::EF_ALT_DOWN) ==
774 views::Event::EF_ALT_DOWN), 774 views::Event::EF_ALT_DOWN),
775 ((flags & views::Event::EF_COMMAND_DOWN) == 775 ((flags & views::Event::EF_COMMAND_DOWN) ==
776 views::Event::EF_COMMAND_DOWN)); 776 views::Event::EF_COMMAND_DOWN));
777 } 777 }
778 778
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 DCHECK(type == NotificationType::SESSION_END); 1100 DCHECK(type == NotificationType::SESSION_END);
1101 // OnBrowserRemoving does a ReleaseLater. When session end is received we exit 1101 // OnBrowserRemoving does a ReleaseLater. When session end is received we exit
1102 // before the task runs resulting in this object not being deleted. This 1102 // before the task runs resulting in this object not being deleted. This
1103 // Release balance out the Release scheduled by OnBrowserRemoving. 1103 // Release balance out the Release scheduled by OnBrowserRemoving.
1104 Release(); 1104 Release();
1105 } 1105 }
1106 1106
1107 void TestingAutomationProvider::OnRemoveProvider() { 1107 void TestingAutomationProvider::OnRemoveProvider() {
1108 AutomationProviderList::GetInstance()->RemoveProvider(this); 1108 AutomationProviderList::GetInstance()->RemoveProvider(this);
1109 } 1109 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_win.cc ('k') | chrome/browser/automation/ui_controls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698