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

Unified Diff: remoting/host/event_executor_mac.cc

Issue 10833060: Update for OS X 10.6 SDK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « no previous file | remoting/host/video_frame_capturer_mac.mm » ('j') | remoting/host/video_frame_capturer_mac.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/event_executor_mac.cc
diff --git a/remoting/host/event_executor_mac.cc b/remoting/host/event_executor_mac.cc
index 72f4144ddd8e4ed1095ed763364c541e3ff0a2e5..971ca510ea6bd563c6e57164516c55785cba433c 100644
--- a/remoting/host/event_executor_mac.cc
+++ b/remoting/host/event_executor_mac.cc
@@ -71,7 +71,10 @@ EventExecutorMac::EventExecutorMac(
// If the non-deprecated injection APIs were used instead, the equivalent of
// this line would not be needed, as OS X defaults to _not_ suppressing local
// inputs in that case.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
CGSetLocalEventsSuppressionInterval(0.0);
+#pragma clang diagnostic pop
}
// Hard-coded mapping from Virtual Key codes to Mac KeySyms.
@@ -293,7 +296,10 @@ void EventExecutorMac::InjectKeyEvent(const KeyEvent& event) {
// We use the deprecated event injection API because the new one doesn't
// work with switched-out sessions (curtain mode).
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
CGError error = CGPostKeyboardEvent(0, keycode, event.pressed());
+#pragma clang diagnostic pop
if (error != kCGErrorSuccess) {
LOG(WARNING) << "CGPostKeyboardEvent error " << error;
}
@@ -332,10 +338,13 @@ void EventExecutorMac::InjectMouseEvent(const MouseEvent& event) {
MiddleBit = 1 << (MouseEvent::BUTTON_MIDDLE - 1),
RightBit = 1 << (MouseEvent::BUTTON_RIGHT - 1)
};
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
CGError error = CGPostMouseEvent(position, true, 3,
(mouse_button_state_ & LeftBit) != 0,
(mouse_button_state_ & RightBit) != 0,
(mouse_button_state_ & MiddleBit) != 0);
+#pragma clang diagnostic pop
if (error != kCGErrorSuccess) {
LOG(WARNING) << "CGPostMouseEvent error " << error;
}
@@ -344,7 +353,10 @@ void EventExecutorMac::InjectMouseEvent(const MouseEvent& event) {
int dx = event.wheel_offset_x();
int dy = event.wheel_offset_y();
// Note that |dy| (the vertical wheel) is the primary wheel.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
error = CGPostScrollWheelEvent(2, dy, dx);
+#pragma clang diagnostic pop
if (error != kCGErrorSuccess) {
LOG(WARNING) << "CGPostScrollWheelEvent error " << error;
}
« no previous file with comments | « no previous file | remoting/host/video_frame_capturer_mac.mm » ('j') | remoting/host/video_frame_capturer_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698