| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/tab_contents/tab_contents_view_mac.h" | 5 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/browser/browser.h" // TODO(beng): this dependency is awful. | 9 #include "chrome/browser/browser.h" // TODO(beng): this dependency is awful. |
| 10 #include "chrome/browser/cocoa/sad_tab_view.h" | 10 #include "chrome/browser/cocoa/sad_tab_view.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // that selection. | 184 // that selection. |
| 185 SetInitialFocus(); | 185 SetInitialFocus(); |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 void TabContentsViewMac::UpdateDragCursor(WebDragOperation operation) { | 189 void TabContentsViewMac::UpdateDragCursor(WebDragOperation operation) { |
| 190 [cocoa_view_ setCurrentDragOperation: operation]; | 190 [cocoa_view_ setCurrentDragOperation: operation]; |
| 191 } | 191 } |
| 192 | 192 |
| 193 void TabContentsViewMac::GotFocus() { | 193 void TabContentsViewMac::GotFocus() { |
| 194 NOTIMPLEMENTED(); | 194 // This is only used in the views FocusManager stuff but it bleeds through |
| 195 // all subclasses. http://crbug.com/21875 |
| 195 } | 196 } |
| 196 | 197 |
| 197 // This is called when we the renderer asks us to take focus back (i.e., it has | 198 // This is called when we the renderer asks us to take focus back (i.e., it has |
| 198 // iterated past the last focusable element on the page). | 199 // iterated past the last focusable element on the page). |
| 199 void TabContentsViewMac::TakeFocus(bool reverse) { | 200 void TabContentsViewMac::TakeFocus(bool reverse) { |
| 200 if (reverse) { | 201 if (reverse) { |
| 201 [[cocoa_view_ window] selectPreviousKeyView:cocoa_view_.get()]; | 202 [[cocoa_view_ window] selectPreviousKeyView:cocoa_view_.get()]; |
| 202 } else { | 203 } else { |
| 203 [[cocoa_view_ window] selectNextKeyView:cocoa_view_.get()]; | 204 [[cocoa_view_ window] selectNextKeyView:cocoa_view_.get()]; |
| 204 } | 205 } |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 } | 410 } |
| 410 | 411 |
| 411 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { | 412 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { |
| 412 return [dropTarget_ performDragOperation:sender view:self]; | 413 return [dropTarget_ performDragOperation:sender view:self]; |
| 413 } | 414 } |
| 414 | 415 |
| 415 // Tons of stuff goes here, where we grab events going on in Cocoaland and send | 416 // Tons of stuff goes here, where we grab events going on in Cocoaland and send |
| 416 // them into the C++ system. TODO(avi): all that jazz | 417 // them into the C++ system. TODO(avi): all that jazz |
| 417 | 418 |
| 418 @end | 419 @end |
| OLD | NEW |