OLD | NEW |
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 #import <Carbon/Carbon.h> | 5 #import <Carbon/Carbon.h> |
6 | 6 |
7 #import "content/browser/web_contents/web_contents_view_mac.h" | 7 #import "content/browser/web_contents/web_contents_view_mac.h" |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // For some reason known only to Cocoa, the autorecalculation of the key view | 135 // For some reason known only to Cocoa, the autorecalculation of the key view |
136 // loop set on the window doesn't set the next key view when the subview is | 136 // loop set on the window doesn't set the next key view when the subview is |
137 // added. On 10.6 things magically work fine; on 10.5 they fail | 137 // added. On 10.6 things magically work fine; on 10.5 they fail |
138 // <http://crbug.com/61493>. Digging into Cocoa key view loop code yielded | 138 // <http://crbug.com/61493>. Digging into Cocoa key view loop code yielded |
139 // madness; TODO(avi,rohit): look at this again and figure out what's really | 139 // madness; TODO(avi,rohit): look at this again and figure out what's really |
140 // going on. | 140 // going on. |
141 [cocoa_view_.get() setNextKeyView:view_view]; | 141 [cocoa_view_.get() setNextKeyView:view_view]; |
142 return view; | 142 return view; |
143 } | 143 } |
144 | 144 |
| 145 RenderWidgetHostView* WebContentsViewMac::CreateViewForPopupWidget( |
| 146 RenderWidgetHost* render_widget_host) { |
| 147 return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); |
| 148 } |
| 149 |
145 gfx::NativeView WebContentsViewMac::GetNativeView() const { | 150 gfx::NativeView WebContentsViewMac::GetNativeView() const { |
146 return cocoa_view_.get(); | 151 return cocoa_view_.get(); |
147 } | 152 } |
148 | 153 |
149 gfx::NativeView WebContentsViewMac::GetContentNativeView() const { | 154 gfx::NativeView WebContentsViewMac::GetContentNativeView() const { |
150 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 155 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
151 if (!rwhv) | 156 if (!rwhv) |
152 return NULL; | 157 return NULL; |
153 return rwhv->GetNativeView(); | 158 return rwhv->GetNativeView(); |
154 } | 159 } |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 [[[notification userInfo] objectForKey:kSelectionDirection] | 552 [[[notification userInfo] objectForKey:kSelectionDirection] |
548 unsignedIntegerValue]; | 553 unsignedIntegerValue]; |
549 if (direction == NSDirectSelection) | 554 if (direction == NSDirectSelection) |
550 return; | 555 return; |
551 | 556 |
552 [self webContents]-> | 557 [self webContents]-> |
553 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 558 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
554 } | 559 } |
555 | 560 |
556 @end | 561 @end |
OLD | NEW |