| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 is_loading_(false), | 239 is_loading_(false), |
| 240 is_hidden_(false), | 240 is_hidden_(false), |
| 241 shutdown_factory_(this), | 241 shutdown_factory_(this), |
| 242 needs_gpu_visibility_update_after_repaint_(false), | 242 needs_gpu_visibility_update_after_repaint_(false), |
| 243 compositing_surface_(gfx::kNullPluginWindow) { | 243 compositing_surface_(gfx::kNullPluginWindow) { |
| 244 // |cocoa_view_| owns us and we will be deleted when |cocoa_view_| goes away. | 244 // |cocoa_view_| owns us and we will be deleted when |cocoa_view_| goes away. |
| 245 // Since we autorelease it, our caller must put |native_view()| into the view | 245 // Since we autorelease it, our caller must put |native_view()| into the view |
| 246 // hierarchy right after calling us. | 246 // hierarchy right after calling us. |
| 247 cocoa_view_ = [[[RenderWidgetHostViewCocoa alloc] | 247 cocoa_view_ = [[[RenderWidgetHostViewCocoa alloc] |
| 248 initWithRenderWidgetHostViewMac:this] autorelease]; | 248 initWithRenderWidgetHostViewMac:this] autorelease]; |
| 249 render_widget_host_->set_view(this); | 249 render_widget_host_->SetView(this); |
| 250 | 250 |
| 251 if (render_widget_host_->IsRenderView()) { | 251 if (render_widget_host_->IsRenderView()) { |
| 252 new SpellCheckRenderViewObserver( | 252 new SpellCheckRenderViewObserver( |
| 253 static_cast<RenderViewHost*>(widget), this); | 253 static_cast<RenderViewHost*>(widget), this); |
| 254 } | 254 } |
| 255 } | 255 } |
| 256 | 256 |
| 257 RenderWidgetHostViewMac::~RenderWidgetHostViewMac() { | 257 RenderWidgetHostViewMac::~RenderWidgetHostViewMac() { |
| 258 } | 258 } |
| 259 | 259 |
| (...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2595 if (!string) return NO; | 2595 if (!string) return NO; |
| 2596 | 2596 |
| 2597 // If the user is currently using an IME, confirm the IME input, | 2597 // If the user is currently using an IME, confirm the IME input, |
| 2598 // and then insert the text from the service, the same as TextEdit and Safari. | 2598 // and then insert the text from the service, the same as TextEdit and Safari. |
| 2599 [self confirmComposition]; | 2599 [self confirmComposition]; |
| 2600 [self insertText:string]; | 2600 [self insertText:string]; |
| 2601 return YES; | 2601 return YES; |
| 2602 } | 2602 } |
| 2603 | 2603 |
| 2604 @end | 2604 @end |
| OLD | NEW |