OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #import "base/mac/cocoa_protocols.h" | 7 #import "base/mac/cocoa_protocols.h" |
8 #include "base/memory/scoped_nsobject.h" | 8 #include "base/memory/scoped_nsobject.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/cookies_tree_model.h" | 10 #include "chrome/browser/cookies_tree_model.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 DISALLOW_COPY_AND_ASSIGN(CollectedCookiesMac); | 48 DISALLOW_COPY_AND_ASSIGN(CollectedCookiesMac); |
49 }; | 49 }; |
50 | 50 |
51 // Controller for the collected cookies dialog. This class stores an internal | 51 // Controller for the collected cookies dialog. This class stores an internal |
52 // copy of the CookiesTreeModel but with Cocoa-converted values (NSStrings and | 52 // copy of the CookiesTreeModel but with Cocoa-converted values (NSStrings and |
53 // NSImages instead of std::strings and SkBitmaps). Doing this allows us to use | 53 // NSImages instead of std::strings and SkBitmaps). Doing this allows us to use |
54 // bindings for the interface. Changes are pushed to this internal model via a | 54 // bindings for the interface. Changes are pushed to this internal model via a |
55 // very thin bridge (see cookies_window_controller.h). | 55 // very thin bridge (see cookies_window_controller.h). |
56 @interface CollectedCookiesWindowController : NSWindowController | 56 @interface CollectedCookiesWindowController : NSWindowController |
57 <NSOutlineViewDelegate, | 57 <NSOutlineViewDelegate, |
| 58 NSTabViewDelegate, |
58 NSWindowDelegate> { | 59 NSWindowDelegate> { |
59 @private | 60 @private |
60 // Platform-independent model. | 61 // Platform-independent model. |
61 scoped_ptr<CookiesTreeModel> allowedTreeModel_; | 62 scoped_ptr<CookiesTreeModel> allowedTreeModel_; |
62 scoped_ptr<CookiesTreeModel> blockedTreeModel_; | 63 scoped_ptr<CookiesTreeModel> blockedTreeModel_; |
63 | 64 |
64 // Cached array of icons. | 65 // Cached array of icons. |
65 scoped_nsobject<NSMutableArray> icons_; | 66 scoped_nsobject<NSMutableArray> icons_; |
66 | 67 |
67 // Our Cocoa copy of the model. | 68 // Our Cocoa copy of the model. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 - (CocoaCookieTreeNode*)cocoaBlockedTreeModel; | 115 - (CocoaCookieTreeNode*)cocoaBlockedTreeModel; |
115 - (void)setCocoaAllowedTreeModel:(CocoaCookieTreeNode*)model; | 116 - (void)setCocoaAllowedTreeModel:(CocoaCookieTreeNode*)model; |
116 - (void)setCocoaBlockedTreeModel:(CocoaCookieTreeNode*)model; | 117 - (void)setCocoaBlockedTreeModel:(CocoaCookieTreeNode*)model; |
117 | 118 |
118 // Returns the |allowedTreeModel_| and |blockedTreeModel_|. | 119 // Returns the |allowedTreeModel_| and |blockedTreeModel_|. |
119 - (CookiesTreeModel*)allowedTreeModel; | 120 - (CookiesTreeModel*)allowedTreeModel; |
120 - (CookiesTreeModel*)blockedTreeModel; | 121 - (CookiesTreeModel*)blockedTreeModel; |
121 | 122 |
122 - (void)loadTreeModelFromTabContents; | 123 - (void)loadTreeModelFromTabContents; |
123 @end | 124 @end |
OLD | NEW |