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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

Issue 3117035: Mac: Unregress right-clicks for CoreAnimation plugins. (Closed)
Patch Set: '' 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <QuartzCore/QuartzCore.h> 5 #include <QuartzCore/QuartzCore.h>
6 6
7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" 7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
8 8
9 #include "app/surface/io_surface_support_mac.h" 9 #include "app/surface/io_surface_support_mac.h"
10 #import "base/chrome_application_mac.h" 10 #import "base/chrome_application_mac.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 cglContext_, pluginHandle_); 230 cglContext_, pluginHandle_);
231 231
232 CGLFlushDrawable(cglContext_); 232 CGLFlushDrawable(cglContext_);
233 CGLUnlockContext(cglContext_); 233 CGLUnlockContext(cglContext_);
234 } 234 }
235 235
236 - (void)drawRect:(NSRect)rect { 236 - (void)drawRect:(NSRect)rect {
237 [self drawView]; 237 [self drawView];
238 } 238 }
239 239
240 - (void)rightMouseDown:(NSEvent*)event {
241 // The NSResponder documentation: "Note: The NSView implementation of this
242 // method does not pass the message up the responder chain, it handles it
243 // directly."
244 // That's bad, we want the next responder (RWHVMac) to handle this event to
245 // dispatch it to the renderer.
246 [[self nextResponder] rightMouseDown:event];
247 }
248
240 - (void)globalFrameDidChange:(NSNotification*)notification { 249 - (void)globalFrameDidChange:(NSNotification*)notification {
241 CGLLockContext(cglContext_); 250 CGLLockContext(cglContext_);
242 [glContext_ update]; 251 [glContext_ update];
243 252
244 // You would think that -update updates the viewport. You would be wrong. 253 // You would think that -update updates the viewport. You would be wrong.
245 CGLSetCurrentContext(cglContext_); 254 CGLSetCurrentContext(cglContext_);
246 NSSize size = [self frame].size; 255 NSSize size = [self frame].size;
247 glViewport(0, 0, size.width, size.height); 256 glViewport(0, 0, size.width, size.height);
248 257
249 CGLUnlockContext(cglContext_); 258 CGLUnlockContext(cglContext_);
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 NSArray* toDeclare = [NSArray arrayWithObject:NSStringPboardType]; 2295 NSArray* toDeclare = [NSArray arrayWithObject:NSStringPboardType];
2287 [pboard declareTypes:toDeclare owner:nil]; 2296 [pboard declareTypes:toDeclare owner:nil];
2288 return [pboard setString:text forType:NSStringPboardType]; 2297 return [pboard setString:text forType:NSStringPboardType];
2289 } 2298 }
2290 2299
2291 - (BOOL)readSelectionFromPasteboard:(NSPasteboard*)pboard { 2300 - (BOOL)readSelectionFromPasteboard:(NSPasteboard*)pboard {
2292 return NO; 2301 return NO;
2293 } 2302 }
2294 2303
2295 @end 2304 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698