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

Unified Diff: chrome/browser/cocoa/custom_home_pages_model.h

Issue 3045020: Merge 53961 - [Mac] Fix the custom homepages preferences to:... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/cocoa/custom_home_pages_model.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/custom_home_pages_model.h
===================================================================
--- chrome/browser/cocoa/custom_home_pages_model.h (revision 53981)
+++ chrome/browser/cocoa/custom_home_pages_model.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,6 +9,7 @@
#include <vector>
#include "base/scoped_nsobject.h"
+#include "chrome/browser/history/history.h"
#include "googleurl/src/gurl.h"
class Profile;
@@ -35,6 +36,10 @@
- (std::vector<GURL>)URLs;
- (void)setURLs:(const std::vector<GURL>&)urls;
+// Reloads the URLs from their stored state. This will notify using KVO
+// |customHomePages|.
+- (void)reloadURLs;
+
// Validates the set of URLs stored in the model. The user may have input bad
// data. This function removes invalid entries from the model, which will result
// in anyone observing being updated.
@@ -47,11 +52,31 @@
- (void)removeObjectFromCustomHomePagesAtIndex:(NSUInteger)index;
@end
-@interface CustomHomePagesModel(InternalOrTestingAPI)
+////////////////////////////////////////////////////////////////////////////////
+// An entry representing a single item in the custom home page model. Stores
+// a url and a favicon.
+@interface CustomHomePageEntry : NSObject {
+ @private
+ scoped_nsobject<NSString> url_;
+ scoped_nsobject<NSImage> icon_;
+
+ // If non-zero, indicates we're loading the favicon for the page.
+ HistoryService::Handle icon_handle_;
+}
+
+@property(nonatomic, copy) NSString* URL;
+@property(nonatomic, retain) NSImage* image;
+
+@end
+
+////////////////////////////////////////////////////////////////////////////////
+
+@interface CustomHomePagesModel (InternalOrTestingAPI)
+
// Clears the URL string at the specified index. This constitutes bad data. The
// validator should scrub the entry from the list the next time it is run.
-- (void) setURLStringEmptyAt:(NSUInteger)index;
+- (void)setURLStringEmptyAt:(NSUInteger)index;
@end
« no previous file with comments | « no previous file | chrome/browser/cocoa/custom_home_pages_model.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698