OLD | NEW |
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 #include "chrome/browser/ui/panels/panel_browser_window_cocoa.h" | 5 #include "chrome/browser/ui/panels/panel_browser_window_cocoa.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_list.h" | 10 #include "chrome/browser/ui/browser_list.h" |
11 #import "chrome/browser/ui/cocoa/browser_window_utils.h" | 11 #import "chrome/browser/ui/cocoa/browser_window_utils.h" |
12 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" | 12 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" |
13 #include "chrome/browser/ui/cocoa/task_manager_mac.h" | 13 #include "chrome/browser/ui/cocoa/task_manager_mac.h" |
14 #include "chrome/browser/ui/panels/panel.h" | 14 #include "chrome/browser/ui/panels/panel.h" |
15 #include "chrome/browser/ui/panels/panel_manager.h" | 15 #include "chrome/browser/ui/panels/panel_manager.h" |
16 #import "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h" | 16 #import "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h" |
17 #import "chrome/browser/ui/panels/panel_utils_cocoa.h" | 17 #import "chrome/browser/ui/panels/panel_utils_cocoa.h" |
18 #import "chrome/browser/ui/panels/panel_window_controller_cocoa.h" | 18 #import "chrome/browser/ui/panels/panel_window_controller_cocoa.h" |
19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
20 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 20 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
21 #include "chrome/browser/ui/webui/task_manager/task_manager_dialog.h" | 21 #include "chrome/browser/ui/webui/task_manager/task_manager_dialog.h" |
22 #include "chrome/common/chrome_notification_types.h" | 22 #include "chrome/common/chrome_notification_types.h" |
23 #include "content/public/browser/native_web_keyboard_event.h" | 23 #include "content/public/browser/native_web_keyboard_event.h" |
24 #include "content/public/browser/notification_source.h" | 24 #include "content/public/browser/notification_source.h" |
25 | 25 |
| 26 using content::NativeWebKeyboardEvent; |
26 using content::WebContents; | 27 using content::WebContents; |
27 | 28 |
28 namespace { | 29 namespace { |
29 | 30 |
30 // Use this instead of 0 for minimum size of a window when doing opening and | 31 // Use this instead of 0 for minimum size of a window when doing opening and |
31 // closing animations, since OSX window manager does not like 0-sized windows | 32 // closing animations, since OSX window manager does not like 0-sized windows |
32 // (according to avi@). | 33 // (according to avi@). |
33 const int kMinimumWindowSize = 1; | 34 const int kMinimumWindowSize = 1; |
34 | 35 |
35 } // namespace | 36 } // namespace |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 return ![[titlebar() closeButton] isHidden]; | 451 return ![[titlebar() closeButton] isHidden]; |
451 case MINIMIZE_BUTTON: | 452 case MINIMIZE_BUTTON: |
452 return ![[titlebar() minimizeButton] isHidden]; | 453 return ![[titlebar() minimizeButton] isHidden]; |
453 case RESTORE_BUTTON: | 454 case RESTORE_BUTTON: |
454 return ![[titlebar() restoreButton] isHidden]; | 455 return ![[titlebar() restoreButton] isHidden]; |
455 default: | 456 default: |
456 NOTREACHED(); | 457 NOTREACHED(); |
457 } | 458 } |
458 return false; | 459 return false; |
459 } | 460 } |
OLD | NEW |