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

Side by Side Diff: trunk/src/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm

Issue 163913004: Revert 250826 "Remove Profile dependency from apps::ShellWindow" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/cocoa/apps/native_app_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h"
6 6
7 #include "apps/app_shim/extension_app_shim_handler_mac.h" 7 #include "apps/app_shim/extension_app_shim_handler_mac.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 system_drag_exclude_areas_.push_back(window_bounds); 358 system_drag_exclude_areas_.push_back(window_bounds);
359 } 359 }
360 360
361 InstallView(); 361 InstallView();
362 362
363 [[window_controller_ window] setDelegate:window_controller_]; 363 [[window_controller_ window] setDelegate:window_controller_];
364 [window_controller_ setAppWindow:this]; 364 [window_controller_ setAppWindow:this];
365 UpdateWindowMinMaxSize(); 365 UpdateWindowMinMaxSize();
366 366
367 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryCocoa( 367 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryCocoa(
368 Profile::FromBrowserContext(shell_window_->browser_context()), 368 shell_window_->profile(),
369 window, 369 window,
370 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, 370 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
371 shell_window)); 371 shell_window));
372 } 372 }
373 373
374 NSUInteger NativeAppWindowCocoa::GetWindowStyleMask() const { 374 NSUInteger NativeAppWindowCocoa::GetWindowStyleMask() const {
375 NSUInteger style_mask = NSTitledWindowMask | NSClosableWindowMask | 375 NSUInteger style_mask = NSTitledWindowMask | NSClosableWindowMask |
376 NSMiniaturizableWindowMask; 376 NSMiniaturizableWindowMask;
377 if (shows_resize_controls_) 377 if (shows_resize_controls_)
378 style_mask |= NSResizableWindowMask; 378 style_mask |= NSResizableWindowMask;
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 [window() setContentMinSize:NSMakeSize(min_size.width(), min_size.height())]; 1028 [window() setContentMinSize:NSMakeSize(min_size.width(), min_size.height())];
1029 1029
1030 gfx::Size max_size = shell_window_->size_constraints().GetMaximumSize(); 1030 gfx::Size max_size = shell_window_->size_constraints().GetMaximumSize();
1031 const int kUnboundedSize = ShellWindow::SizeConstraints::kUnboundedSize; 1031 const int kUnboundedSize = ShellWindow::SizeConstraints::kUnboundedSize;
1032 CGFloat max_width = max_size.width() == kUnboundedSize ? 1032 CGFloat max_width = max_size.width() == kUnboundedSize ?
1033 CGFLOAT_MAX : max_size.width(); 1033 CGFLOAT_MAX : max_size.width();
1034 CGFloat max_height = max_size.height() == kUnboundedSize ? 1034 CGFloat max_height = max_size.height() == kUnboundedSize ?
1035 CGFLOAT_MAX : max_size.height(); 1035 CGFLOAT_MAX : max_size.height();
1036 [window() setContentMaxSize:NSMakeSize(max_width, max_height)]; 1036 [window() setContentMaxSize:NSMakeSize(max_width, max_height)];
1037 } 1037 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698