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

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

Issue 165492: Make "Get Themes" button in prefs foreground the browser window (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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 | « chrome/browser/cocoa/preferences_window_controller.mm ('k') | 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 <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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void TabContentsViewMac::SizeContents(const gfx::Size& size) { 137 void TabContentsViewMac::SizeContents(const gfx::Size& size) {
138 // TODO(brettw | japhet) This is a hack and should be removed. 138 // TODO(brettw | japhet) This is a hack and should be removed.
139 // See tab_contents_view.h. 139 // See tab_contents_view.h.
140 gfx::Rect rect(gfx::Point(), size); 140 gfx::Rect rect(gfx::Point(), size);
141 TabContentsViewCocoa* view = cocoa_view_.get(); 141 TabContentsViewCocoa* view = cocoa_view_.get();
142 [view setFrame:[view RectToNSRect:rect]]; 142 [view setFrame:[view RectToNSRect:rect]];
143 } 143 }
144 144
145 void TabContentsViewMac::Focus() { 145 void TabContentsViewMac::Focus() {
146 [[cocoa_view_.get() window] makeFirstResponder:GetContentNativeView()]; 146 [[cocoa_view_.get() window] makeFirstResponder:GetContentNativeView()];
147 [[cocoa_view_.get() window] makeKeyAndOrderFront:GetContentNativeView()];
147 } 148 }
148 149
149 void TabContentsViewMac::SetInitialFocus() { 150 void TabContentsViewMac::SetInitialFocus() {
150 if (tab_contents()->FocusLocationBarByDefault()) 151 if (tab_contents()->FocusLocationBarByDefault())
151 tab_contents()->delegate()->SetFocusToLocationBar(); 152 tab_contents()->delegate()->SetFocusToLocationBar();
152 else 153 else
153 [[cocoa_view_.get() window] makeFirstResponder:GetContentNativeView()]; 154 [[cocoa_view_.get() window] makeFirstResponder:GetContentNativeView()];
154 } 155 }
155 156
156 void TabContentsViewMac::StoreFocus() { 157 void TabContentsViewMac::StoreFocus() {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 } 402 }
402 403
403 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { 404 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender {
404 return [dropTarget_ performDragOperation:sender view:self]; 405 return [dropTarget_ performDragOperation:sender view:self];
405 } 406 }
406 407
407 // Tons of stuff goes here, where we grab events going on in Cocoaland and send 408 // Tons of stuff goes here, where we grab events going on in Cocoaland and send
408 // them into the C++ system. TODO(avi): all that jazz 409 // them into the C++ system. TODO(avi): all that jazz
409 410
410 @end 411 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698