OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/app_controller_mac.h" | 5 #import "chrome/browser/app_controller_mac.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" | 44 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" |
45 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h" | 45 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
46 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 46 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
47 #import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h" | 47 #import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h" |
48 #import "chrome/browser/ui/cocoa/encoding_menu_controller_delegate_mac.h" | 48 #import "chrome/browser/ui/cocoa/encoding_menu_controller_delegate_mac.h" |
49 #import "chrome/browser/ui/cocoa/history_menu_bridge.h" | 49 #import "chrome/browser/ui/cocoa/history_menu_bridge.h" |
50 #import "chrome/browser/ui/cocoa/profile_menu_controller.h" | 50 #import "chrome/browser/ui/cocoa/profile_menu_controller.h" |
51 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 51 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
52 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" | 52 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" |
53 #include "chrome/browser/ui/cocoa/task_manager_mac.h" | 53 #include "chrome/browser/ui/cocoa/task_manager_mac.h" |
| 54 #include "chrome/browser/ui/panels/panel_manager.h" |
54 #include "chrome/common/chrome_notification_types.h" | 55 #include "chrome/common/chrome_notification_types.h" |
55 #include "chrome/common/chrome_paths_internal.h" | 56 #include "chrome/common/chrome_paths_internal.h" |
56 #include "chrome/common/chrome_switches.h" | 57 #include "chrome/common/chrome_switches.h" |
57 #include "chrome/common/cloud_print/cloud_print_class_mac.h" | 58 #include "chrome/common/cloud_print/cloud_print_class_mac.h" |
58 #include "chrome/common/mac/app_mode_common.h" | 59 #include "chrome/common/mac/app_mode_common.h" |
59 #include "chrome/common/pref_names.h" | 60 #include "chrome/common/pref_names.h" |
60 #include "chrome/common/service_messages.h" | 61 #include "chrome/common/service_messages.h" |
61 #include "chrome/common/url_constants.h" | 62 #include "chrome/common/url_constants.h" |
62 #include "content/browser/download/download_manager.h" | 63 #include "content/browser/download/download_manager.h" |
63 #include "content/browser/tab_contents/tab_contents.h" | 64 #include "content/browser/tab_contents/tab_contents.h" |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 } | 1244 } |
1244 | 1245 |
1245 - (void)clearStartupUrls { | 1246 - (void)clearStartupUrls { |
1246 startupUrls_.clear(); | 1247 startupUrls_.clear(); |
1247 } | 1248 } |
1248 | 1249 |
1249 - (BookmarkMenuBridge*)bookmarkMenuBridge { | 1250 - (BookmarkMenuBridge*)bookmarkMenuBridge { |
1250 return bookmarkMenuBridge_.get(); | 1251 return bookmarkMenuBridge_.get(); |
1251 } | 1252 } |
1252 | 1253 |
| 1254 - (void)applicationDidChangeScreenParameters:(NSNotification *)notification { |
| 1255 // During this callback the working area is not always already updated. Defer. |
| 1256 [self performSelector:@selector(delayedPanelManagerScreenParametersUpdate) |
| 1257 withObject:nil |
| 1258 afterDelay:0]; |
| 1259 } |
| 1260 |
| 1261 - (void)delayedPanelManagerScreenParametersUpdate { |
| 1262 PanelManager::GetInstance()->OnDisplayChanged(); |
| 1263 } |
| 1264 |
1253 @end // @implementation AppController | 1265 @end // @implementation AppController |
1254 | 1266 |
1255 //--------------------------------------------------------------------------- | 1267 //--------------------------------------------------------------------------- |
1256 | 1268 |
1257 namespace browser { | 1269 namespace browser { |
1258 | 1270 |
1259 void ShowInstantConfirmDialog(gfx::NativeWindow parent, Profile* profile) { | 1271 void ShowInstantConfirmDialog(gfx::NativeWindow parent, Profile* profile) { |
1260 if (Browser* browser = ActivateBrowser(profile)) { | 1272 if (Browser* browser = ActivateBrowser(profile)) { |
1261 browser->OpenInstantConfirmDialog(); | 1273 browser->OpenInstantConfirmDialog(); |
1262 } else { | 1274 } else { |
1263 Browser::OpenInstantConfirmDialogWindow(profile); | 1275 Browser::OpenInstantConfirmDialogWindow(profile); |
1264 } | 1276 } |
1265 } | 1277 } |
1266 | 1278 |
1267 } // namespace browser | 1279 } // namespace browser |
1268 | 1280 |
1269 namespace app_controller_mac { | 1281 namespace app_controller_mac { |
1270 | 1282 |
1271 bool IsOpeningNewWindow() { | 1283 bool IsOpeningNewWindow() { |
1272 return g_is_opening_new_window; | 1284 return g_is_opening_new_window; |
1273 } | 1285 } |
1274 | 1286 |
1275 } // namespace app_controller_mac | 1287 } // namespace app_controller_mac |
OLD | NEW |