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

Side by Side Diff: chrome/browser/ui/cocoa/apps/scoped_fake_nswindow_main_status.h

Issue 1053303003: [MacViews] Implement colored window frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed a few things. Created 5 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_APPS_SCOPED_FAKE_NSWINDOW_MAIN_STATUS_H_
tapted 2015/05/12 06:15:43 This needs to be in a /test folder, or at the very
jackhou1 2015/05/14 02:59:13 Done. Moved to chrome/browser/ui/test.
6 #define CHROME_BROWSER_UI_COCOA_APPS_SCOPED_FAKE_NSWINDOW_MAIN_STATUS_H_
7
8 #import "base/mac/scoped_objc_class_swizzler.h"
9
10 @class NSWindow;
11
12 // Simulates a particular NSWindow to report YES for [NSWindow isMainWindow].
13 // This allows test coverage of code relying on window focus changes without
14 // resorting to an interactive_ui_test.
15 class ScopedFakeNSWindowMainStatus {
16 public:
17 explicit ScopedFakeNSWindowMainStatus(NSWindow* window);
18 ~ScopedFakeNSWindowMainStatus();
19
20 static NSWindow* GetMainWindow() { return window_; }
21
22 private:
23 static NSWindow* window_;
tapted 2015/05/12 06:15:43 can this be moved to an anonymous namespace like g
jackhou1 2015/05/14 02:59:13 Done.
24 base::mac::ScopedObjCClassSwizzler swizzler_;
25
26 DISALLOW_COPY_AND_ASSIGN(ScopedFakeNSWindowMainStatus);
27 };
28
29 #endif // CHROME_BROWSER_UI_COCOA_APPS_SCOPED_FAKE_NSWINDOW_MAIN_STATUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698