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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 [[cocoa_view_ window] convertScreenToBase:global_origin]; | 592 [[cocoa_view_ window] convertScreenToBase:global_origin]; |
593 NSPoint view_origin = | 593 NSPoint view_origin = |
594 [cocoa_view_ convertPoint:window_origin fromView:nil]; | 594 [cocoa_view_ convertPoint:window_origin fromView:nil]; |
595 NSRect initial_frame = NSMakeRect(view_origin.x, | 595 NSRect initial_frame = NSMakeRect(view_origin.x, |
596 view_origin.y, | 596 view_origin.y, |
597 pos.width(), | 597 pos.width(), |
598 pos.height()); | 598 pos.height()); |
599 [cocoa_view_ setFrame:initial_frame]; | 599 [cocoa_view_ setFrame:initial_frame]; |
600 } | 600 } |
601 | 601 |
602 void RenderWidgetHostViewMac::InitAsFullscreen( | 602 void RenderWidgetHostViewMac::InitAsFullscreen() { |
603 RenderWidgetHostView* parent_host_view) { | |
604 NOTIMPLEMENTED() << "Full screen not implemented on Mac"; | 603 NOTIMPLEMENTED() << "Full screen not implemented on Mac"; |
605 } | 604 } |
606 | 605 |
607 RenderWidgetHost* RenderWidgetHostViewMac::GetRenderWidgetHost() const { | 606 RenderWidgetHost* RenderWidgetHostViewMac::GetRenderWidgetHost() const { |
608 return render_widget_host_; | 607 return render_widget_host_; |
609 } | 608 } |
610 | 609 |
611 void RenderWidgetHostViewMac::DidBecomeSelected() { | 610 void RenderWidgetHostViewMac::DidBecomeSelected() { |
612 if (!is_hidden_) | 611 if (!is_hidden_) |
613 return; | 612 return; |
(...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2831 if (!string) return NO; | 2830 if (!string) return NO; |
2832 | 2831 |
2833 // If the user is currently using an IME, confirm the IME input, | 2832 // If the user is currently using an IME, confirm the IME input, |
2834 // and then insert the text from the service, the same as TextEdit and Safari. | 2833 // and then insert the text from the service, the same as TextEdit and Safari. |
2835 [self confirmComposition]; | 2834 [self confirmComposition]; |
2836 [self insertText:string]; | 2835 [self insertText:string]; |
2837 return YES; | 2836 return YES; |
2838 } | 2837 } |
2839 | 2838 |
2840 @end | 2839 @end |
OLD | NEW |