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

Side by Side Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.mm

Issue 11633052: Rename platform-independent ConstrainedWindow types to WebContentsModalDialog types (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use gtk_widget_get_toplevel for GetNativeWindow Created 7 years, 11 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
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/constrained_window/constrained_window_alert.h" 5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h"
6 6
7 #import "base/logging.h" 7 #import "base/logging.h"
8 #import "chrome/browser/ui/chrome_style.h" 8 #import "chrome/browser/ui/chrome_style.h"
9 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h" 9 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_u tils.h" 10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_u tils.h"
11 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi ndow.h" 11 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi ndow.h"
12 #import "chrome/browser/ui/cocoa/hover_close_button.h" 12 #import "chrome/browser/ui/cocoa/hover_close_button.h"
13 #import "chrome/browser/ui/constrained_window.h" 13 #import "chrome/browser/ui/web_contents_modal_dialog.h"
14 #include "skia/ext/skia_utils_mac.h" 14 #include "skia/ext/skia_utils_mac.h"
15 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" 15 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
16 #include "ui/base/cocoa/window_size_constants.h" 16 #include "ui/base/cocoa/window_size_constants.h"
17 17
18 namespace { 18 namespace {
19 19
20 const CGFloat kWindowMinWidth = 500; 20 const CGFloat kWindowMinWidth = 500;
21 const CGFloat kButtonGap = 6; 21 const CGFloat kButtonGap = 6;
22 22
23 } // namespace 23 } // namespace
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 frame.size.width = chrome_style::GetCloseButtonSize(); 222 frame.size.width = chrome_style::GetCloseButtonSize();
223 frame.size.height = chrome_style::GetCloseButtonSize(); 223 frame.size.height = chrome_style::GetCloseButtonSize();
224 frame.origin.x = windowWidth - 224 frame.origin.x = windowWidth -
225 chrome_style::kCloseButtonPadding - NSWidth(frame); 225 chrome_style::kCloseButtonPadding - NSWidth(frame);
226 frame.origin.y = windowHeight - 226 frame.origin.y = windowHeight -
227 chrome_style::kCloseButtonPadding - NSHeight(frame); 227 chrome_style::kCloseButtonPadding - NSHeight(frame);
228 [closeButton_ setFrame:frame]; 228 [closeButton_ setFrame:frame];
229 } 229 }
230 230
231 @end 231 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698