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 #import "chrome/browser/app_controller_mac.h" | 5 #import "chrome/browser/app_controller_mac.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 } | 1567 } |
1568 | 1568 |
1569 - (void)applicationDidChangeScreenParameters:(NSNotification*)notification { | 1569 - (void)applicationDidChangeScreenParameters:(NSNotification*)notification { |
1570 // During this callback the working area is not always already updated. Defer. | 1570 // During this callback the working area is not always already updated. Defer. |
1571 [self performSelector:@selector(delayedScreenParametersUpdate) | 1571 [self performSelector:@selector(delayedScreenParametersUpdate) |
1572 withObject:nil | 1572 withObject:nil |
1573 afterDelay:0]; | 1573 afterDelay:0]; |
1574 } | 1574 } |
1575 | 1575 |
1576 - (void)delayedScreenParametersUpdate { | 1576 - (void)delayedScreenParametersUpdate { |
1577 FOR_EACH_OBSERVER(ui::WorkAreaWatcherObserver, workAreaChangeObservers_, | 1577 for (auto& observer : workAreaChangeObservers_) |
1578 WorkAreaChanged()); | 1578 observer.WorkAreaChanged(); |
1579 } | 1579 } |
1580 | 1580 |
1581 - (BOOL)application:(NSApplication*)application | 1581 - (BOOL)application:(NSApplication*)application |
1582 willContinueUserActivityWithType:(NSString*)userActivityType { | 1582 willContinueUserActivityWithType:(NSString*)userActivityType { |
1583 return [userActivityType isEqualToString:NSUserActivityTypeBrowsingWeb]; | 1583 return [userActivityType isEqualToString:NSUserActivityTypeBrowsingWeb]; |
1584 } | 1584 } |
1585 | 1585 |
1586 - (BOOL)application:(NSApplication*)application | 1586 - (BOOL)application:(NSApplication*)application |
1587 continueUserActivity:(NSUserActivity*)userActivity | 1587 continueUserActivity:(NSUserActivity*)userActivity |
1588 restorationHandler:(void (^)(NSArray*))restorationHandler { | 1588 restorationHandler:(void (^)(NSArray*))restorationHandler { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1665 | 1665 |
1666 //--------------------------------------------------------------------------- | 1666 //--------------------------------------------------------------------------- |
1667 | 1667 |
1668 namespace app_controller_mac { | 1668 namespace app_controller_mac { |
1669 | 1669 |
1670 bool IsOpeningNewWindow() { | 1670 bool IsOpeningNewWindow() { |
1671 return g_is_opening_new_window; | 1671 return g_is_opening_new_window; |
1672 } | 1672 } |
1673 | 1673 |
1674 } // namespace app_controller_mac | 1674 } // namespace app_controller_mac |
OLD | NEW |