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

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 1701006: Implement UI automation on the Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/find_bar_host_interactive_uitest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 45975)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -1191,21 +1191,40 @@
// to windows. The real fix to this bug is to disable the commands when they
// won't do anything. We'll need something like an overall clipboard command
// manager to do that.
+#if !defined(OS_MACOSX)
void BrowserView::Cut() {
- ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_X, true,
- false, false);
+ ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_X,
+ true, false, false, false);
}
void BrowserView::Copy() {
- ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_C, true,
- false, false);
+ ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_C,
+ true, false, false, false);
}
void BrowserView::Paste() {
- ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_V, true,
- false, false);
+ ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_V,
+ true, false, false, false);
}
+#else
+// Mac versions. Not tested by antyhing yet;
+// don't assume written == works.
+void BrowserView::Cut() {
+ ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_X,
+ false, false, false, true);
+}
+void BrowserView::Copy() {
+ ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_C,
+ false, false, false, true);
+}
+
+void BrowserView::Paste() {
+ ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_V,
+ false, false, false, true);
+}
+#endif
+
///////////////////////////////////////////////////////////////////////////////
// BrowserView, BrowserWindowTesting implementation:
« no previous file with comments | « chrome/browser/views/find_bar_host_interactive_uitest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698