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

Side by Side Diff: content/shell/shell_browser_main_parts_mac.mm

Issue 11009017: Mac Web Intents Part 11: Progress view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | 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 "content/shell/shell_browser_main_parts.h" 5 #ifndef CHROME_BROWSER_UI_COCOA_SPINNER_PROGRESS_INDICATOR_
Robert Sesek 2012/10/10 21:29:36 ?
sail 2012/10/10 21:39:37 Bad patching. Fixed.
6 #define CHROME_BROWSER_UI_COCOA_SPINNER_PROGRESS_INDICATOR_
6 7
7 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
8 9
9 #include "base/mac/bundle_locations.h"
10 #include "base/memory/scoped_nsobject.h" 10 #include "base/memory/scoped_nsobject.h"
11 #include "content/shell/shell_application_mac.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/time.h"
12 13
13 namespace content { 14 namespace base {
14 15 class Timer;
15 void ShellBrowserMainParts::PreMainMessageLoopStart() {
16 // Force the NSApplication subclass to be used.
17 [ShellCrApplication sharedApplication];
18
19 scoped_nsobject<NSNib>
20 nib([[NSNib alloc] initWithNibNamed:@"MainMenu"
21 bundle:base::mac::FrameworkBundle()]);
22 [nib instantiateNibWithOwner:NSApp topLevelObjects:nil];
23 } 16 }
24 17
25 } // namespace content 18 // A progress indicator that draws progress as a pie chart. An indeterminate
19 // state is represented by simply spinning a slice of the pie around the
20 // control.
21 @interface SpinnerProgressIndicator : NSView {
22 @private
23 scoped_ptr<base::Timer> timer_;
24 base::TimeTicks startTime_;
25 int percentDone_;
26 BOOL isIndeterminate_;
27 }
28
29 @property(nonatomic, assign) int percentDone;
30 @property(nonatomic, assign) BOOL isIndeterminate;
31
32 - (void)sizeToFit;
33
34 @end
35
36 #endif // CHROME_BROWSER_UI_COCOA_SPINNER_PROGRESS_INDICATOR_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698