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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 1053463002: MacViews: Use native certificate viewer in MacViews browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@translate
Patch Set: Fix for tapted and rebase Created 5 years, 8 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
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.h ('k') | chrome/browser/ui/tab_dialogs.h » ('j') | 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) 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 "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 2271 matching lines...) Expand 10 before | Expand all | Expand 10 after
2282 forButtonState:image_button_cell::kHoverStateBackground]; 2282 forButtonState:image_button_cell::kHoverStateBackground];
2283 } else { 2283 } else {
2284 [[newTabButton_ cell] setImage:nil 2284 [[newTabButton_ cell] setImage:nil
2285 forButtonState:image_button_cell::kDefaultStateBackground]; 2285 forButtonState:image_button_cell::kDefaultStateBackground];
2286 [[newTabButton_ cell] setImage:nil 2286 [[newTabButton_ cell] setImage:nil
2287 forButtonState:image_button_cell::kHoverStateBackground]; 2287 forButtonState:image_button_cell::kHoverStateBackground];
2288 } 2288 }
2289 } 2289 }
2290 2290
2291 @end 2291 @end
2292
2293 NSView* GetSheetParentViewForWebContents(WebContents* web_contents) {
2294 // View hierarchy of the contents view:
2295 // NSView -- switchView, same for all tabs
2296 // +- NSView -- TabContentsController's view
2297 // +- WebContentsViewCocoa
2298 //
2299 // Changing it? Do not forget to modify
2300 // -[TabStripController swapInTabAtIndex:] too.
2301 return [web_contents->GetNativeView() superview];
2302 }
2303
2304 NSRect GetSheetParentBoundsForParentView(NSView* view) {
2305 // If the devtools view is open, it shrinks the size of the WebContents, so go
2306 // up the hierarchy to the devtools container view to avoid that. Note that
2307 // the devtools view is always in the hierarchy even if it is not open or it
2308 // is detached.
2309 NSView* devtools_view = [[[view superview] superview] superview];
2310 if (devtools_view) {
2311 return [devtools_view convertRect:[devtools_view bounds] toView:nil];
2312 } else {
2313 return [view convertRect:[view bounds] toView:nil];
2314 }
2315 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.h ('k') | chrome/browser/ui/tab_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698