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

Side by Side Diff: chrome/browser/cocoa/content_blocked_bubble_controller.mm

Issue 1241006: Add Geolocation to the content types. This adds several special case guards s... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/gtk/options/content_exceptions_window_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/cocoa/content_blocked_bubble_controller.h" 5 #import "chrome/browser/cocoa/content_blocked_bubble_controller.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac_util.h" 9 #include "base/mac_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // This method takes ownership of |contentSettingBubbleModel| in all cases. 87 // This method takes ownership of |contentSettingBubbleModel| in all cases.
88 scoped_ptr<ContentSettingBubbleModel> model(contentSettingBubbleModel); 88 scoped_ptr<ContentSettingBubbleModel> model(contentSettingBubbleModel);
89 DCHECK(model.get()); 89 DCHECK(model.get());
90 90
91 NSString* const nibPaths[CONTENT_SETTINGS_NUM_TYPES] = { 91 NSString* const nibPaths[CONTENT_SETTINGS_NUM_TYPES] = {
92 @"ContentBlockedCookies", 92 @"ContentBlockedCookies",
93 @"ContentBlockedImages", 93 @"ContentBlockedImages",
94 @"ContentBlockedJavaScript", 94 @"ContentBlockedJavaScript",
95 @"ContentBlockedPlugins", 95 @"ContentBlockedPlugins",
96 @"ContentBlockedPopups", 96 @"ContentBlockedPopups",
97 // TODO(joth/thakis): Implement Geolocation. In the meantime, use
98 // another xib here to keep the unit test happy.
99 @"ContentBlockedCookies",
97 }; 100 };
98 COMPILE_ASSERT(arraysize(nibPaths) == CONTENT_SETTINGS_NUM_TYPES, 101 COMPILE_ASSERT(arraysize(nibPaths) == CONTENT_SETTINGS_NUM_TYPES,
99 nibPaths_requires_an_entry_for_every_setting_type); 102 nibPaths_requires_an_entry_for_every_setting_type);
100 const int settingsType = model->content_type(); 103 const int settingsType = model->content_type();
101 DCHECK_LT(settingsType, CONTENT_SETTINGS_NUM_TYPES); 104 DCHECK_LT(settingsType, CONTENT_SETTINGS_NUM_TYPES);
102 NSString* nibPath = 105 NSString* nibPath =
103 [mac_util::MainAppBundle() pathForResource:nibPaths[settingsType] 106 [mac_util::MainAppBundle() pathForResource:nibPaths[settingsType]
104 ofType:@"nib"]; 107 ofType:@"nib"];
105 if ((self = [super initWithWindowNibPath:nibPath owner:self])) { 108 if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
106 parentWindow_ = parentWindow; 109 parentWindow_ = parentWindow;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 contentSettingBubbleModel_->OnManageLinkClicked(); 346 contentSettingBubbleModel_->OnManageLinkClicked();
344 } 347 }
345 348
346 - (void)popupLinkClicked:(id)sender { 349 - (void)popupLinkClicked:(id)sender {
347 content_blocked_bubble::PopupLinks::iterator i(popupLinks_.find(sender)); 350 content_blocked_bubble::PopupLinks::iterator i(popupLinks_.find(sender));
348 DCHECK(i != popupLinks_.end()); 351 DCHECK(i != popupLinks_.end());
349 contentSettingBubbleModel_->OnPopupClicked(i->second); 352 contentSettingBubbleModel_->OnPopupClicked(i->second);
350 } 353 }
351 354
352 @end // ContentBlockedBubbleController 355 @end // ContentBlockedBubbleController
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/options/content_exceptions_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698