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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 10540173: HiDPI: Fix extension bubble size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm » ('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/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 NSScreen* screen = [sourceWindow screen]; 1316 NSScreen* screen = [sourceWindow screen];
1317 windowRect.origin.y = NSHeight([screen frame]) - NSMaxY(windowRect); 1317 windowRect.origin.y = NSHeight([screen frame]) - NSMaxY(windowRect);
1318 gfx::Rect browserRect(windowRect.origin.x, windowRect.origin.y, 1318 gfx::Rect browserRect(windowRect.origin.x, windowRect.origin.y,
1319 NSWidth(windowRect), NSHeight(windowRect)); 1319 NSWidth(windowRect), NSHeight(windowRect));
1320 1320
1321 NSRect sourceTabRect = [tabView frame]; 1321 NSRect sourceTabRect = [tabView frame];
1322 NSView* tabStrip = [self tabStripView]; 1322 NSView* tabStrip = [self tabStripView];
1323 1323
1324 // Pushes tabView's frame back inside the tabstrip. 1324 // Pushes tabView's frame back inside the tabstrip.
1325 NSSize tabOverflow = 1325 NSSize tabOverflow =
1326 [self overflowFrom:[tabStrip convertRectToBase:sourceTabRect] 1326 [self overflowFrom:[tabStrip convertRect:sourceTabRect toView:nil]
1327 to:[tabStrip frame]]; 1327 to:[tabStrip frame]];
1328 NSRect tabRect = NSOffsetRect(sourceTabRect, 1328 NSRect tabRect = NSOffsetRect(sourceTabRect,
1329 -tabOverflow.width, -tabOverflow.height); 1329 -tabOverflow.width, -tabOverflow.height);
1330 1330
1331 // Before detaching the tab, store the pinned state. 1331 // Before detaching the tab, store the pinned state.
1332 bool isPinned = browser_->IsTabPinned(index); 1332 bool isPinned = browser_->IsTabPinned(index);
1333 1333
1334 // Detach it from the source window, which just updates the model without 1334 // Detach it from the source window, which just updates the model without
1335 // deleting the tab contents. This needs to come before creating the new 1335 // deleting the tab contents. This needs to come before creating the new
1336 // Browser because it clears the WebContents' delegate, which gets hooked 1336 // Browser because it clears the WebContents' delegate, which gets hooked
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 2217
2218 - (BOOL)supportsBookmarkBar { 2218 - (BOOL)supportsBookmarkBar {
2219 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2219 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2220 } 2220 }
2221 2221
2222 - (BOOL)isTabbedWindow { 2222 - (BOOL)isTabbedWindow {
2223 return browser_->is_type_tabbed(); 2223 return browser_->is_type_tabbed();
2224 } 2224 }
2225 2225
2226 @end // @implementation BrowserWindowController(WindowType) 2226 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698