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

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

Issue 9355017: Merge 122386 - Fix Mac custom cursor color. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gfx/native_widget_types.h » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include <QuartzCore/QuartzCore.h> 7 #include <QuartzCore/QuartzCore.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 // Don't update the cursor if a context menu is being shown. 499 // Don't update the cursor if a context menu is being shown.
500 if (is_showing_context_menu_) 500 if (is_showing_context_menu_)
501 return; 501 return;
502 502
503 // Can we synchronize to the event stream? Switch to -[NSWindow 503 // Can we synchronize to the event stream? Switch to -[NSWindow
504 // mouseLocationOutsideOfEventStream] if we cannot. TODO(avi): test and see 504 // mouseLocationOutsideOfEventStream] if we cannot. TODO(avi): test and see
505 NSEvent* event = [[cocoa_view_ window] currentEvent]; 505 NSEvent* event = [[cocoa_view_ window] currentEvent];
506 if ([event window] != [cocoa_view_ window]) 506 if ([event window] != [cocoa_view_ window])
507 return; 507 return;
508 508
509 NSCursor* ns_cursor = current_cursor_.GetCursor(); 509 NSCursor* ns_cursor = current_cursor_.GetNativeCursor();
510 [ns_cursor set]; 510 [ns_cursor set];
511 } 511 }
512 512
513 void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) { 513 void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) {
514 is_loading_ = is_loading; 514 is_loading_ = is_loading;
515 // If we ever decide to show the waiting cursor while the page is loading 515 // If we ever decide to show the waiting cursor while the page is loading
516 // like Chrome does on Windows, call |UpdateCursorIfNecessary()| here. 516 // like Chrome does on Windows, call |UpdateCursorIfNecessary()| here.
517 } 517 }
518 518
519 void RenderWidgetHostViewMac::TextInputStateChanged( 519 void RenderWidgetHostViewMac::TextInputStateChanged(
(...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after
2767 if (!string) return NO; 2767 if (!string) return NO;
2768 2768
2769 // If the user is currently using an IME, confirm the IME input, 2769 // If the user is currently using an IME, confirm the IME input,
2770 // and then insert the text from the service, the same as TextEdit and Safari. 2770 // and then insert the text from the service, the same as TextEdit and Safari.
2771 [self confirmComposition]; 2771 [self confirmComposition];
2772 [self insertText:string]; 2772 [self insertText:string];
2773 return YES; 2773 return YES;
2774 } 2774 }
2775 2775
2776 @end 2776 @end
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/native_widget_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698