OLD | NEW |
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/app_switches.h" | 9 #include "app/app_switches.h" |
10 #include "app/surface/io_surface_support_mac.h" | 10 #include "app/surface/io_surface_support_mac.h" |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 needs_gpu_visibility_update_after_repaint_(false) { | 517 needs_gpu_visibility_update_after_repaint_(false) { |
518 // |cocoa_view_| owns us and we will be deleted when |cocoa_view_| goes away. | 518 // |cocoa_view_| owns us and we will be deleted when |cocoa_view_| goes away. |
519 // Since we autorelease it, our caller must put |native_view()| into the view | 519 // Since we autorelease it, our caller must put |native_view()| into the view |
520 // hierarchy right after calling us. | 520 // hierarchy right after calling us. |
521 cocoa_view_ = [[[RenderWidgetHostViewCocoa alloc] | 521 cocoa_view_ = [[[RenderWidgetHostViewCocoa alloc] |
522 initWithRenderWidgetHostViewMac:this] autorelease]; | 522 initWithRenderWidgetHostViewMac:this] autorelease]; |
523 render_widget_host_->set_view(this); | 523 render_widget_host_->set_view(this); |
524 | 524 |
525 // Turn on accessibility only if VoiceOver is running. | 525 // Turn on accessibility only if VoiceOver is running. |
526 if (IsVoiceOverRunning()) { | 526 if (IsVoiceOverRunning()) { |
527 Singleton<BrowserAccessibilityState>()->OnScreenReaderDetected(); | 527 BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected(); |
528 render_widget_host_->EnableRendererAccessibility(); | 528 render_widget_host_->EnableRendererAccessibility(); |
529 } | 529 } |
530 } | 530 } |
531 | 531 |
532 RenderWidgetHostViewMac::~RenderWidgetHostViewMac() { | 532 RenderWidgetHostViewMac::~RenderWidgetHostViewMac() { |
533 } | 533 } |
534 | 534 |
535 /////////////////////////////////////////////////////////////////////////////// | 535 /////////////////////////////////////////////////////////////////////////////// |
536 // RenderWidgetHostViewMac, RenderWidgetHostView implementation: | 536 // RenderWidgetHostViewMac, RenderWidgetHostView implementation: |
537 | 537 |
(...skipping 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2678 if (!string) return NO; | 2678 if (!string) return NO; |
2679 | 2679 |
2680 // If the user is currently using an IME, confirm the IME input, | 2680 // If the user is currently using an IME, confirm the IME input, |
2681 // and then insert the text from the service, the same as TextEdit and Safari. | 2681 // and then insert the text from the service, the same as TextEdit and Safari. |
2682 [self confirmComposition]; | 2682 [self confirmComposition]; |
2683 [self insertText:string]; | 2683 [self insertText:string]; |
2684 return YES; | 2684 return YES; |
2685 } | 2685 } |
2686 | 2686 |
2687 @end | 2687 @end |
OLD | NEW |