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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 2426223002: Reduce FOR_EACH_OBSERVER macro usage in chrome/browser (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/background/background_application_list_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background/background_application_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698