| OLD | NEW |
| 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" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/ui/cocoa/browser_window_utils.h" | 12 #include "chrome/browser/ui/cocoa/browser_window_utils.h" |
| 13 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" | 13 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" |
| 14 #include "chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa
.h" | 14 #include "chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa
.h" |
| 15 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" | 15 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/common/extensions/extension.h" | |
| 18 #include "content/public/browser/native_web_keyboard_event.h" | 17 #include "content/public/browser/native_web_keyboard_event.h" |
| 19 #include "content/public/browser/render_widget_host_view.h" | 18 #include "content/public/browser/render_widget_host_view.h" |
| 20 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 21 #include "content/public/browser/web_contents_view.h" | 20 #include "content/public/browser/web_contents_view.h" |
| 21 #include "extensions/common/extension.h" |
| 22 #include "third_party/skia/include/core/SkRegion.h" | 22 #include "third_party/skia/include/core/SkRegion.h" |
| 23 | 23 |
| 24 // NOTE: State Before Update. | 24 // NOTE: State Before Update. |
| 25 // | 25 // |
| 26 // Internal state, such as |is_maximized_|, must be set before the window | 26 // Internal state, such as |is_maximized_|, must be set before the window |
| 27 // state is changed so that it is accurate when e.g. a resize results in a call | 27 // state is changed so that it is accurate when e.g. a resize results in a call |
| 28 // to |OnNativeWindowChanged|. | 28 // to |OnNativeWindowChanged|. |
| 29 | 29 |
| 30 // NOTE: Maximize and Zoom. | 30 // NOTE: Maximize and Zoom. |
| 31 // | 31 // |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 [window() setContentMinSize:NSMakeSize(min_size.width(), min_size.height())]; | 1009 [window() setContentMinSize:NSMakeSize(min_size.width(), min_size.height())]; |
| 1010 | 1010 |
| 1011 gfx::Size max_size = shell_window_->size_constraints().GetMaximumSize(); | 1011 gfx::Size max_size = shell_window_->size_constraints().GetMaximumSize(); |
| 1012 const int kUnboundedSize = ShellWindow::SizeConstraints::kUnboundedSize; | 1012 const int kUnboundedSize = ShellWindow::SizeConstraints::kUnboundedSize; |
| 1013 CGFloat max_width = max_size.width() == kUnboundedSize ? | 1013 CGFloat max_width = max_size.width() == kUnboundedSize ? |
| 1014 CGFLOAT_MAX : max_size.width(); | 1014 CGFLOAT_MAX : max_size.width(); |
| 1015 CGFloat max_height = max_size.height() == kUnboundedSize ? | 1015 CGFloat max_height = max_size.height() == kUnboundedSize ? |
| 1016 CGFLOAT_MAX : max_size.height(); | 1016 CGFLOAT_MAX : max_size.height(); |
| 1017 [window() setContentMaxSize:NSMakeSize(max_width, max_height)]; | 1017 [window() setContentMaxSize:NSMakeSize(max_width, max_height)]; |
| 1018 } | 1018 } |
| OLD | NEW |