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

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

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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
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/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 1010
1011 if (event.type == WebInputEvent::MouseLeave) { 1011 if (event.type == WebInputEvent::MouseLeave) {
1012 [cocoa_view_ setToolTipAtMousePoint:nil]; 1012 [cocoa_view_ setToolTipAtMousePoint:nil];
1013 tooltip_text_.clear(); 1013 tooltip_text_.clear();
1014 } 1014 }
1015 } 1015 }
1016 1016
1017 void RenderWidgetHostViewMac::KillSelf() { 1017 void RenderWidgetHostViewMac::KillSelf() {
1018 if (!weak_factory_.HasWeakPtrs()) { 1018 if (!weak_factory_.HasWeakPtrs()) {
1019 [cocoa_view_ setHidden:YES]; 1019 [cocoa_view_ setHidden:YES];
1020 MessageLoop::current()->PostTask(FROM_HERE, 1020 base::MessageLoop::current()->PostTask(FROM_HERE,
1021 base::Bind(&RenderWidgetHostViewMac::ShutdownHost, 1021 base::Bind(&RenderWidgetHostViewMac::ShutdownHost,
1022 weak_factory_.GetWeakPtr())); 1022 weak_factory_.GetWeakPtr()));
1023 } 1023 }
1024 } 1024 }
1025 1025
1026 bool RenderWidgetHostViewMac::PostProcessEventForPluginIme( 1026 bool RenderWidgetHostViewMac::PostProcessEventForPluginIme(
1027 const NativeWebKeyboardEvent& event) { 1027 const NativeWebKeyboardEvent& event) {
1028 // Check WebInputEvent type since multiple types of events can be sent into 1028 // Check WebInputEvent type since multiple types of events can be sent into
1029 // WebKit for the same OS event (e.g., RawKeyDown and Char), so filtering is 1029 // WebKit for the same OS event (e.g., RawKeyDown and Char), so filtering is
1030 // necessary to avoid double processing. 1030 // necessary to avoid double processing.
(...skipping 2339 matching lines...) Expand 10 before | Expand all | Expand 10 after
3370 if (!string) return NO; 3370 if (!string) return NO;
3371 3371
3372 // If the user is currently using an IME, confirm the IME input, 3372 // If the user is currently using an IME, confirm the IME input,
3373 // and then insert the text from the service, the same as TextEdit and Safari. 3373 // and then insert the text from the service, the same as TextEdit and Safari.
3374 [self confirmComposition]; 3374 [self confirmComposition];
3375 [self insertText:string]; 3375 [self insertText:string];
3376 return YES; 3376 return YES;
3377 } 3377 }
3378 3378
3379 @end 3379 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698