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

Unified Diff: chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm

Issue 11044020: Make Web Intents picker in Views conform to latest mocks (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Include changes from CL 11077006 Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm
diff --git a/chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm b/chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm
index 7eb5f59b7143cb09f917aecb7d88619d4e77536b..d58b384179a4a922d5e4dfc1caa00ae8d077aa8b 100644
--- a/chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm
+++ b/chrome/browser/ui/cocoa/intents/web_intent_picker_view_controller.mm
@@ -170,7 +170,11 @@
NSRect bounds = NSInsetRect(innerFrame,
-ConstrainedWindow::kHorizontalPadding,
- -ConstrainedWindow::kVerticalPadding);
+ 0);
+ bounds.origin.y -= ConstrainedWindow::kClientTopPadding;
+ bounds.size.height = NSHeight(innerFrame) +
+ ConstrainedWindow::kClientTopPadding +
+ ConstrainedWindow::kClientBottomPadding;
[[viewController view] setFrame:bounds];
[viewController layoutSubviewsWithinFrame:innerFrame];
@@ -188,9 +192,14 @@
- (NSRect)minimumInnerFrame {
NSRect bounds = NSMakeRect(0, 0, WebIntentPicker::kWindowMinWidth,
WebIntentPicker::kWindowMinHeight);
- return NSInsetRect(bounds,
- ConstrainedWindow::kHorizontalPadding,
- ConstrainedWindow::kVerticalPadding);
+ bounds = NSInsetRect(bounds,
+ ConstrainedWindow::kHorizontalPadding,
+ 0);
+ bounds.origin.y += ConstrainedWindow::kClientTopPadding;
+ bounds.size.height = bounds.size.height -
+ ConstrainedWindow::kClientTopPadding -
+ ConstrainedWindow::kClientBottomPadding;
+ return bounds;
}
- (NSViewController<WebIntentViewController>*)currentViewController {

Powered by Google App Engine
This is Rietveld 408576698