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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/shell_browser_main_parts_mac.mm
diff --git a/content/shell/shell_browser_main_parts_mac.mm b/content/shell/shell_browser_main_parts_mac.mm
index 687c161b21af360754c65bb7da20a84953185d41..2e9641e7566c43b7ab8be9ab32ae489e0178fc46 100644
--- a/content/shell/shell_browser_main_parts_mac.mm
+++ b/content/shell/shell_browser_main_parts_mac.mm
@@ -2,24 +2,35 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/shell/shell_browser_main_parts.h"
Robert Sesek 2012/10/10 21:29:36 ?
sail 2012/10/10 21:39:37 Bad patching. Fixed.
+#ifndef CHROME_BROWSER_UI_COCOA_SPINNER_PROGRESS_INDICATOR_
+#define CHROME_BROWSER_UI_COCOA_SPINNER_PROGRESS_INDICATOR_
#import <Cocoa/Cocoa.h>
-#include "base/mac/bundle_locations.h"
#include "base/memory/scoped_nsobject.h"
-#include "content/shell/shell_application_mac.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/time.h"
-namespace content {
-
-void ShellBrowserMainParts::PreMainMessageLoopStart() {
- // Force the NSApplication subclass to be used.
- [ShellCrApplication sharedApplication];
+namespace base {
+class Timer;
+}
- scoped_nsobject<NSNib>
- nib([[NSNib alloc] initWithNibNamed:@"MainMenu"
- bundle:base::mac::FrameworkBundle()]);
- [nib instantiateNibWithOwner:NSApp topLevelObjects:nil];
+// A progress indicator that draws progress as a pie chart. An indeterminate
+// state is represented by simply spinning a slice of the pie around the
+// control.
+@interface SpinnerProgressIndicator : NSView {
+ @private
+ scoped_ptr<base::Timer> timer_;
+ base::TimeTicks startTime_;
+ int percentDone_;
+ BOOL isIndeterminate_;
}
-} // namespace content
+@property(nonatomic, assign) int percentDone;
+@property(nonatomic, assign) BOOL isIndeterminate;
+
+- (void)sizeToFit;
+
+@end
+
+#endif // CHROME_BROWSER_UI_COCOA_SPINNER_PROGRESS_INDICATOR_

Powered by Google App Engine
This is Rietveld 408576698