OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/gfx/rect.h" | 5 #include "base/gfx/rect.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
8 #include "chrome/browser/bookmarks/bookmark_utils.h" | 8 #include "chrome/browser/bookmarks/bookmark_utils.h" |
9 #include "chrome/browser/cocoa/browser_window_cocoa.h" | 9 #include "chrome/browser/cocoa/browser_window_cocoa.h" |
10 #include "chrome/browser/cocoa/browser_window_controller.h" | 10 #import "chrome/browser/cocoa/browser_window_controller.h" |
| 11 #import "chrome/browser/cocoa/clear_browsing_data_controller.h" |
11 #include "chrome/browser/browser.h" | 12 #include "chrome/browser/browser.h" |
12 #include "chrome/common/notification_service.h" | 13 #include "chrome/common/notification_service.h" |
13 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
14 #include "chrome/common/pref_service.h" | 15 #include "chrome/common/pref_service.h" |
15 #include "chrome/browser/profile.h" | 16 #include "chrome/browser/profile.h" |
16 | 17 |
17 BrowserWindowCocoa::BrowserWindowCocoa(Browser* browser, | 18 BrowserWindowCocoa::BrowserWindowCocoa(Browser* browser, |
18 BrowserWindowController* controller, | 19 BrowserWindowController* controller, |
19 NSWindow* window) | 20 NSWindow* window) |
20 : window_(window), browser_(browser), controller_(controller) { | 21 : window_(window), browser_(browser), controller_(controller) { |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 void BrowserWindowCocoa::ShowBookmarkBubble(const GURL& url, | 180 void BrowserWindowCocoa::ShowBookmarkBubble(const GURL& url, |
180 bool already_bookmarked) { | 181 bool already_bookmarked) { |
181 NOTIMPLEMENTED(); | 182 NOTIMPLEMENTED(); |
182 } | 183 } |
183 | 184 |
184 void BrowserWindowCocoa::ShowReportBugDialog() { | 185 void BrowserWindowCocoa::ShowReportBugDialog() { |
185 NOTIMPLEMENTED(); | 186 NOTIMPLEMENTED(); |
186 } | 187 } |
187 | 188 |
188 void BrowserWindowCocoa::ShowClearBrowsingDataDialog() { | 189 void BrowserWindowCocoa::ShowClearBrowsingDataDialog() { |
189 NOTIMPLEMENTED(); | 190 scoped_nsobject<ClearBrowsingDataController> controller( |
| 191 [[ClearBrowsingDataController alloc] |
| 192 initWithProfile:browser_->profile()]); |
| 193 [controller runModalDialog]; |
190 } | 194 } |
191 | 195 |
192 void BrowserWindowCocoa::ShowImportDialog() { | 196 void BrowserWindowCocoa::ShowImportDialog() { |
193 NOTIMPLEMENTED(); | 197 NOTIMPLEMENTED(); |
194 } | 198 } |
195 | 199 |
196 void BrowserWindowCocoa::ShowSearchEnginesDialog() { | 200 void BrowserWindowCocoa::ShowSearchEnginesDialog() { |
197 NOTIMPLEMENTED(); | 201 NOTIMPLEMENTED(); |
198 } | 202 } |
199 | 203 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 break; | 246 break; |
243 } | 247 } |
244 } | 248 } |
245 | 249 |
246 void BrowserWindowCocoa::DestroyBrowser() { | 250 void BrowserWindowCocoa::DestroyBrowser() { |
247 [controller_ destroyBrowser]; | 251 [controller_ destroyBrowser]; |
248 | 252 |
249 // at this point the controller is dead (autoreleased), so | 253 // at this point the controller is dead (autoreleased), so |
250 // make sure we don't try to reference it any more. | 254 // make sure we don't try to reference it any more. |
251 } | 255 } |
OLD | NEW |