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

Side by Side Diff: chrome/browser/ui/cocoa/panels/display_settings_provider_cocoa.mm

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | Annotate | Revision Log
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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/mac/mac_util.h" 6 #include "base/mac/mac_util.h"
7 #include "base/memory/weak_ptr.h" 7 #include "base/memory/weak_ptr.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Since the fullscreen result is already known here, we can pass it dierctly 129 // Since the fullscreen result is already known here, we can pass it dierctly
130 // to CheckFullScreenMode. 130 // to CheckFullScreenMode.
131 bool is_fullscreen = *(content::Details<bool>(details)).ptr(); 131 bool is_fullscreen = *(content::Details<bool>(details)).ptr();
132 CheckFullScreenMode( 132 CheckFullScreenMode(
133 is_fullscreen ? ASSUME_FULLSCREEN_ON : ASSUME_FULLSCREEN_OFF); 133 is_fullscreen ? ASSUME_FULLSCREEN_ON : ASSUME_FULLSCREEN_OFF);
134 } 134 }
135 135
136 void DisplaySettingsProviderCocoa::ActiveWorkSpaceChanged() { 136 void DisplaySettingsProviderCocoa::ActiveWorkSpaceChanged() {
137 // The active workspace notification might be received earlier than the 137 // The active workspace notification might be received earlier than the
138 // browser window knows that it is not in active space. 138 // browser window knows that it is not in active space.
139 MessageLoop::current()->PostDelayedTask( 139 base::MessageLoop::current()->PostDelayedTask(
140 FROM_HERE, 140 FROM_HERE,
141 base::Bind(&DisplaySettingsProviderCocoa::CheckFullScreenMode, 141 base::Bind(&DisplaySettingsProviderCocoa::CheckFullScreenMode,
142 weak_factory_.GetWeakPtr(), 142 weak_factory_.GetWeakPtr(),
143 PERFORM_FULLSCREEN_CHECK), 143 PERFORM_FULLSCREEN_CHECK),
144 base::TimeDelta::FromMilliseconds(kCheckFullScreenDelayTimeMs)); 144 base::TimeDelta::FromMilliseconds(kCheckFullScreenDelayTimeMs));
145 } 145 }
146 146
147 } // namespace 147 } // namespace
148 148
149 // static 149 // static
150 DisplaySettingsProvider* DisplaySettingsProvider::Create() { 150 DisplaySettingsProvider* DisplaySettingsProvider::Create() {
151 return new DisplaySettingsProviderCocoa(); 151 return new DisplaySettingsProviderCocoa();
152 } 152 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm ('k') | chrome/browser/ui/cocoa/status_bubble_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698