Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view_mac.mm

Issue 99262: More focus fixing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/browser.h" // TODO(beng): this dependency is awful. 7 #include "chrome/browser/browser.h" // TODO(beng): this dependency is awful.
8 #include "chrome/browser/cocoa/sad_tab_view.h" 8 #include "chrome/browser/cocoa/sad_tab_view.h"
9 #include "chrome/browser/renderer_host/render_widget_host.h" 9 #include "chrome/browser/renderer_host/render_widget_host.h"
10 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" 10 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void TabContentsViewMac::SizeContents(const gfx::Size& size) { 101 void TabContentsViewMac::SizeContents(const gfx::Size& size) {
102 // TODO(brettw) this is a hack and should be removed. See tab_contents_view.h. 102 // TODO(brettw) this is a hack and should be removed. See tab_contents_view.h.
103 NOTIMPLEMENTED(); // Leaving the hack unimplemented. 103 NOTIMPLEMENTED(); // Leaving the hack unimplemented.
104 } 104 }
105 105
106 void TabContentsViewMac::Focus() { 106 void TabContentsViewMac::Focus() {
107 } 107 }
108 108
109 void TabContentsViewMac::SetInitialFocus() { 109 void TabContentsViewMac::SetInitialFocus() {
110 // TODO(port): Set focus in the else case correctly.
111 if (web_contents()->FocusLocationBarByDefault()) 110 if (web_contents()->FocusLocationBarByDefault())
112 web_contents()->delegate()->SetFocusToLocationBar(); 111 web_contents()->delegate()->SetFocusToLocationBar();
112 else
113 [[cocoa_view_.get() window] makeFirstResponder:GetContentNativeView()];
113 } 114 }
114 115
115 void TabContentsViewMac::StoreFocus() { 116 void TabContentsViewMac::StoreFocus() {
116 // TODO(port) 117 // TODO(port)
117 } 118 }
118 119
119 void TabContentsViewMac::RestoreFocus() { 120 void TabContentsViewMac::RestoreFocus() {
120 // TODO(port) 121 // TODO(port)
121 // For now just assume we are viewing the tab for the first time. 122 // For now just assume we are viewing the tab for the first time.
122 SetInitialFocus(); 123 SetInitialFocus();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 245 }
245 246
246 - (void)paste:(id)sender { 247 - (void)paste:(id)sender {
247 TabContentsView_->web_contents()->Paste(); 248 TabContentsView_->web_contents()->Paste();
248 } 249 }
249 250
250 // Tons of stuff goes here, where we grab events going on in Cocoaland and send 251 // Tons of stuff goes here, where we grab events going on in Cocoaland and send
251 // them into the C++ system. TODO(avi): all that jazz 252 // them into the C++ system. TODO(avi): all that jazz
252 253
253 @end 254 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698