summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/nibs/SimpleContentExceptionsWindow.xib (renamed from chrome/app/nibs/GeolocationExceptionsWindow.xib)160
-rw-r--r--chrome/browser/cocoa/content_settings_dialog_controller.mm7
-rw-r--r--chrome/browser/cocoa/simple_content_exceptions_window_controller.h (renamed from chrome/browser/cocoa/geolocation_exceptions_window_controller.h)23
-rw-r--r--chrome/browser/cocoa/simple_content_exceptions_window_controller.mm (renamed from chrome/browser/cocoa/geolocation_exceptions_window_controller.mm)43
-rw-r--r--chrome/browser/cocoa/simple_content_exceptions_window_controller_unittest.mm (renamed from chrome/browser/cocoa/geolocation_exceptions_window_controller_unittest.mm)28
-rw-r--r--chrome/browser/gtk/options/content_filter_page_gtk.cc8
-rw-r--r--chrome/browser/gtk/options/simple_content_exceptions_window.cc (renamed from chrome/browser/gtk/options/geolocation_content_exceptions_window.cc)40
-rw-r--r--chrome/browser/gtk/options/simple_content_exceptions_window.h (renamed from chrome/browser/gtk/options/geolocation_content_exceptions_window.h)32
-rw-r--r--chrome/browser/views/options/content_filter_page_view.cc8
-rw-r--r--chrome/browser/views/options/simple_content_exceptions_view.cc (renamed from chrome/browser/views/options/geolocation_exceptions_view.cc)59
-rw-r--r--chrome/browser/views/options/simple_content_exceptions_view.h (renamed from chrome/browser/views/options/geolocation_exceptions_view.h)42
-rw-r--r--chrome/chrome_browser.gypi14
-rw-r--r--chrome/chrome_dll.gypi2
-rw-r--r--chrome/chrome_tests.gypi2
14 files changed, 237 insertions, 231 deletions
diff --git a/chrome/app/nibs/GeolocationExceptionsWindow.xib b/chrome/app/nibs/SimpleContentExceptionsWindow.xib
index c6de992..a39b394 100644
--- a/chrome/app/nibs/GeolocationExceptionsWindow.xib
+++ b/chrome/app/nibs/SimpleContentExceptionsWindow.xib
@@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="42"/>
+ <integer value="43"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -26,7 +26,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
- <string key="NSClassName">GeolocationExceptionsWindowController</string>
+ <string key="NSClassName">SimpleContentExceptionsWindowController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@@ -375,14 +375,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">tableView_</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="178750169"/>
- </object>
- <int key="connectionID">25</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="178750169"/>
<reference key="destination" ref="1001"/>
@@ -399,19 +391,35 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">removeButton_</string>
+ <string key="label">localizer_</string>
+ <reference key="source" ref="851102986"/>
+ <reference key="destination" ref="792052397"/>
+ </object>
+ <int key="connectionID">45</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">uiObject_</string>
+ <reference key="source" ref="851102986"/>
+ <reference key="destination" ref="1005"/>
+ </object>
+ <int key="connectionID">46</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeRow:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="297568762"/>
</object>
- <int key="connectionID">36</int>
+ <int key="connectionID">50</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">removeAllButton_</string>
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeAll:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="882966747"/>
</object>
- <int key="connectionID">37</int>
+ <int key="connectionID">51</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
@@ -419,47 +427,39 @@
<reference key="source" ref="1001"/>
<reference key="destination" ref="736922088"/>
</object>
- <int key="connectionID">41</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">localizer_</string>
- <reference key="source" ref="851102986"/>
- <reference key="destination" ref="792052397"/>
- </object>
- <int key="connectionID">45</int>
+ <int key="connectionID">52</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">uiObject_</string>
- <reference key="source" ref="851102986"/>
- <reference key="destination" ref="1005"/>
+ <string key="label">tableView_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="178750169"/>
</object>
- <int key="connectionID">46</int>
+ <int key="connectionID">53</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">doneButton_</string>
+ <string key="label">removeButton_</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="736922088"/>
+ <reference key="destination" ref="297568762"/>
</object>
- <int key="connectionID">47</int>
+ <int key="connectionID">54</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">removeRow:</string>
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">removeAllButton_</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="297568762"/>
+ <reference key="destination" ref="882966747"/>
</object>
- <int key="connectionID">48</int>
+ <int key="connectionID">55</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">removeAll:</string>
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">doneButton_</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="882966747"/>
+ <reference key="destination" ref="736922088"/>
</object>
- <int key="connectionID">49</int>
+ <int key="connectionID">56</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -736,7 +736,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">49</int>
+ <int key="maxID">56</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -816,46 +816,6 @@
<reference key="sourceIdentifier" ref="917742388"/>
</object>
<object class="IBPartialClassDescription">
- <string key="className">GeolocationExceptionsWindowController</string>
- <string key="superclassName">NSWindowController</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>closeSheet:</string>
- <string>removeAll:</string>
- <string>removeRow:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>doneButton_</string>
- <string>removeAllButton_</string>
- <string>removeButton_</string>
- <string>tableView_</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSButton</string>
- <string>NSButton</string>
- <string>NSButton</string>
- <string>NSTableView</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">browser/cocoa/geolocation_exceptions_window_controller.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
@@ -897,6 +857,46 @@
<string key="minorKey">browser/cocoa/themed_window.h</string>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SimpleContentExceptionsWindowController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>closeSheet:</string>
+ <string>removeAll:</string>
+ <string>removeRow:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>doneButton_</string>
+ <string>removeAllButton_</string>
+ <string>removeButton_</string>
+ <string>tableView_</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSButton</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
+ <string>NSTableView</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">browser/cocoa/simple_content_exceptions_window_controller.h</string>
+ </object>
+ </object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
diff --git a/chrome/browser/cocoa/content_settings_dialog_controller.mm b/chrome/browser/cocoa/content_settings_dialog_controller.mm
index c635a95..a981a0f 100644
--- a/chrome/browser/cocoa/content_settings_dialog_controller.mm
+++ b/chrome/browser/cocoa/content_settings_dialog_controller.mm
@@ -12,9 +12,10 @@
#include "chrome/browser/browser_window.h"
#import "chrome/browser/cocoa/content_exceptions_window_controller.h"
#import "chrome/browser/cocoa/cookies_window_controller.h"
-#import "chrome/browser/cocoa/geolocation_exceptions_window_controller.h"
+#import "chrome/browser/cocoa/simple_content_exceptions_window_controller.h"
#import "chrome/browser/cocoa/l10n_util.h"
#import "chrome/browser/geolocation/geolocation_content_settings_map.h"
+#import "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
#import "chrome/browser/host_content_settings_map.h"
#include "chrome/browser/pref_service.h"
#include "chrome/browser/profile.h"
@@ -324,7 +325,9 @@ class PrefObserverDisabler {
- (IBAction)showGeolocationExceptions:(id)sender {
GeolocationContentSettingsMap* settingsMap =
profile_->GetGeolocationContentSettingsMap();
- [[GeolocationExceptionsWindowController controllerWithSettingsMap:settingsMap]
+ GeolocationExceptionsTableModel* model = // Freed by window controller.
+ new GeolocationExceptionsTableModel(settingsMap);
+ [[SimpleContentExceptionsWindowController controllerWithTableModel:model]
attachSheetTo:[self window]];
}
diff --git a/chrome/browser/cocoa/geolocation_exceptions_window_controller.h b/chrome/browser/cocoa/simple_content_exceptions_window_controller.h
index 76b29d83..aa1cfcf 100644
--- a/chrome/browser/cocoa/geolocation_exceptions_window_controller.h
+++ b/chrome/browser/cocoa/simple_content_exceptions_window_controller.h
@@ -6,30 +6,29 @@
#include "base/cocoa_protocols_mac.h"
#include "base/scoped_ptr.h"
-#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
+#include "chrome/browser/remove_rows_table_model.h"
-class GeolocationExceptionsTableModel;
-class GeolocationObserverBridge;
+class RemoveRowsObserverBridge;
// Controller for the geolocation exception dialog.
-@interface GeolocationExceptionsWindowController : NSWindowController
- <NSWindowDelegate,
- NSTableViewDataSource,
- NSTableViewDelegate> {
+@interface SimpleContentExceptionsWindowController : NSWindowController
+ <NSWindowDelegate,
+ NSTableViewDataSource,
+ NSTableViewDelegate> {
@private
IBOutlet NSTableView* tableView_;
IBOutlet NSButton* removeButton_;
IBOutlet NSButton* removeAllButton_;
IBOutlet NSButton* doneButton_;
- GeolocationContentSettingsMap* settingsMap_; // weak
- scoped_ptr<GeolocationExceptionsTableModel> model_;
- scoped_ptr<GeolocationObserverBridge> tableObserver_;
+ scoped_ptr<RemoveRowsTableModel> model_;
+ scoped_ptr<RemoveRowsObserverBridge> tableObserver_;
}
// Shows or makes frontmost the geolocation exceptions window.
-// Changes made by the user in the window are persisted in |settingsMap|.
-+ (id)controllerWithSettingsMap:(GeolocationContentSettingsMap*)settingsMap;
+// Changes made by the user in the window are persisted in |model|.
+// Takes ownership of |model|.
++ (id)controllerWithTableModel:(RemoveRowsTableModel*)model;
// Sets the minimum width of the sheet and resizes it if necessary.
- (void)setMinWidth:(CGFloat)minWidth;
diff --git a/chrome/browser/cocoa/geolocation_exceptions_window_controller.mm b/chrome/browser/cocoa/simple_content_exceptions_window_controller.mm
index 654d8e8..34e3c3e 100644
--- a/chrome/browser/cocoa/geolocation_exceptions_window_controller.mm
+++ b/chrome/browser/cocoa/simple_content_exceptions_window_controller.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "chrome/browser/cocoa/geolocation_exceptions_window_controller.h"
+#import "chrome/browser/cocoa/simple_content_exceptions_window_controller.h"
#include <set>
@@ -11,24 +11,22 @@
#import "base/mac_util.h"
#import "base/scoped_nsobject.h"
#include "base/sys_string_conversions.h"
-#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
-#include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
#include "grit/generated_resources.h"
#include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
-@interface GeolocationExceptionsWindowController (Private)
-- (id)initWithSettingsMap:(GeolocationContentSettingsMap*)settingsMap;
-- (void)selectedRows:(GeolocationExceptionsTableModel::Rows*)rows;
+@interface SimpleContentExceptionsWindowController (Private)
+- (id)initWithTableModel:(RemoveRowsTableModel*)model;
+- (void)selectedRows:(RemoveRowsTableModel::Rows*)rows;
- (void)adjustEditingButtons;
- (void)modelDidChange;
@end
-// Observer for the geolocation table model.
-class GeolocationObserverBridge : public TableModelObserver {
+// Observer for a RemoveRowsTableModel.
+class RemoveRowsObserverBridge : public TableModelObserver {
public:
- GeolocationObserverBridge(GeolocationExceptionsWindowController* controller)
+ RemoveRowsObserverBridge(SimpleContentExceptionsWindowController* controller)
: controller_(controller) {}
- virtual ~GeolocationObserverBridge() {}
+ virtual ~RemoveRowsObserverBridge() {}
virtual void OnModelChanged() {
[controller_ modelDidChange];
@@ -44,35 +42,34 @@ class GeolocationObserverBridge : public TableModelObserver {
}
private:
- GeolocationExceptionsWindowController* controller_; // weak
+ SimpleContentExceptionsWindowController* controller_; // weak
};
namespace {
const CGFloat kButtonBarHeight = 35.0;
-GeolocationExceptionsWindowController* g_exceptionWindow = nil;
+SimpleContentExceptionsWindowController* g_exceptionWindow = nil;
} // namespace
-@implementation GeolocationExceptionsWindowController
+@implementation SimpleContentExceptionsWindowController
-+ (id)controllerWithSettingsMap:(GeolocationContentSettingsMap*)settingsMap {
++ (id)controllerWithTableModel:(RemoveRowsTableModel*)model {
if (!g_exceptionWindow) {
- g_exceptionWindow = [[GeolocationExceptionsWindowController alloc]
- initWithSettingsMap:settingsMap];
+ g_exceptionWindow = [[SimpleContentExceptionsWindowController alloc]
+ initWithTableModel:model];
}
return g_exceptionWindow;
}
-- (id)initWithSettingsMap:(GeolocationContentSettingsMap*)settingsMap {
+- (id)initWithTableModel:(RemoveRowsTableModel*)model {
NSString* nibpath =
[mac_util::MainAppBundle() pathForResource:@"GeolocationExceptionsWindow"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
- settingsMap_ = settingsMap;
- model_.reset(new GeolocationExceptionsTableModel(settingsMap_));
- tableObserver_.reset(new GeolocationObserverBridge(self));
+ model_.reset(model);
+ tableObserver_.reset(new RemoveRowsObserverBridge(self));
model_->SetObserver(tableObserver_.get());
// TODO(thakis): autoremember window rect.
@@ -154,7 +151,7 @@ GeolocationExceptionsWindowController* g_exceptionWindow = nil;
}
- (IBAction)removeRow:(id)sender {
- GeolocationExceptionsTableModel::Rows rows;
+ RemoveRowsTableModel::Rows rows;
[self selectedRows:&rows];
model_->RemoveRows(rows);
}
@@ -196,7 +193,7 @@ GeolocationExceptionsWindowController* g_exceptionWindow = nil;
// Private --------------------------------------------------------------------
// Returns the selected rows.
-- (void)selectedRows:(GeolocationExceptionsTableModel::Rows*)rows {
+- (void)selectedRows:(RemoveRowsTableModel::Rows*)rows {
NSIndexSet* selection = [tableView_ selectedRowIndexes];
for (NSUInteger index = [selection lastIndex]; index != NSNotFound;
index = [selection indexLessThanIndex:index])
@@ -206,7 +203,7 @@ GeolocationExceptionsWindowController* g_exceptionWindow = nil;
// This method appropriately sets the enabled states on the table's editing
// buttons.
- (void)adjustEditingButtons {
- GeolocationExceptionsTableModel::Rows rows;
+ RemoveRowsTableModel::Rows rows;
[self selectedRows:&rows];
[removeButton_ setEnabled:model_->CanRemoveRows(rows)];
[removeAllButton_ setEnabled:([tableView_ numberOfRows] > 0)];
diff --git a/chrome/browser/cocoa/geolocation_exceptions_window_controller_unittest.mm b/chrome/browser/cocoa/simple_content_exceptions_window_controller_unittest.mm
index ae2036d..34e96a5 100644
--- a/chrome/browser/cocoa/geolocation_exceptions_window_controller_unittest.mm
+++ b/chrome/browser/cocoa/simple_content_exceptions_window_controller_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "chrome/browser/cocoa/geolocation_exceptions_window_controller.h"
+#import "chrome/browser/cocoa/simple_content_exceptions_window_controller.h"
#import <Cocoa/Cocoa.h>
@@ -10,12 +10,13 @@
#include "base/ref_counted.h"
#include "chrome/browser/cocoa/browser_test_helper.h"
#include "chrome/browser/cocoa/cocoa_test_helper.h"
+#include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
namespace {
-class GeolocationExceptionsWindowControllerTest : public CocoaTest {
+class SimpleContentExceptionsWindowControllerTest : public CocoaTest {
public:
virtual void SetUp() {
CocoaTest::SetUp();
@@ -23,14 +24,16 @@ class GeolocationExceptionsWindowControllerTest : public CocoaTest {
settingsMap_ = new GeolocationContentSettingsMap(profile);
}
- GeolocationExceptionsWindowController* GetController() {
- id controller = [GeolocationExceptionsWindowController
- controllerWithSettingsMap:settingsMap_.get()];
+ SimpleContentExceptionsWindowController* GetController() {
+ GeolocationExceptionsTableModel* model = // Freed by window controller.
+ new GeolocationExceptionsTableModel(settingsMap_.get());
+ id controller = [SimpleContentExceptionsWindowController
+ controllerWithTableModel:model];
[controller showWindow:nil];
return controller;
}
- void ClickRemoveAll(GeolocationExceptionsWindowController* controller) {
+ void ClickRemoveAll(SimpleContentExceptionsWindowController* controller) {
[controller removeAll:nil];
}
@@ -39,19 +42,20 @@ class GeolocationExceptionsWindowControllerTest : public CocoaTest {
scoped_refptr<GeolocationContentSettingsMap> settingsMap_;
};
-TEST_F(GeolocationExceptionsWindowControllerTest, Construction) {
- GeolocationExceptionsWindowController* controller =
- [GeolocationExceptionsWindowController
- controllerWithSettingsMap:settingsMap_.get()];
+TEST_F(SimpleContentExceptionsWindowControllerTest, Construction) {
+ GeolocationExceptionsTableModel* model = // Freed by window controller.
+ new GeolocationExceptionsTableModel(settingsMap_.get());
+ SimpleContentExceptionsWindowController* controller =
+ [SimpleContentExceptionsWindowController controllerWithTableModel:model];
[controller showWindow:nil];
[controller close]; // Should autorelease.
}
-TEST_F(GeolocationExceptionsWindowControllerTest, AddExistingEditAdd) {
+TEST_F(SimpleContentExceptionsWindowControllerTest, AddExistingEditAdd) {
settingsMap_->SetContentSetting(
GURL("http://myhost"), GURL(), CONTENT_SETTING_BLOCK);
- GeolocationExceptionsWindowController* controller = GetController();
+ SimpleContentExceptionsWindowController* controller = GetController();
ClickRemoveAll(controller);
[controller close];
diff --git a/chrome/browser/gtk/options/content_filter_page_gtk.cc b/chrome/browser/gtk/options/content_filter_page_gtk.cc
index 9c2088e..29b2a52 100644
--- a/chrome/browser/gtk/options/content_filter_page_gtk.cc
+++ b/chrome/browser/gtk/options/content_filter_page_gtk.cc
@@ -7,13 +7,14 @@
#include "app/l10n_util.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
+#include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
#include "chrome/browser/host_content_settings_map.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/gtk/browser_window_gtk.h"
#include "chrome/browser/gtk/gtk_chrome_link_button.h"
#include "chrome/browser/gtk/gtk_util.h"
#include "chrome/browser/gtk/options/content_exceptions_window_gtk.h"
-#include "chrome/browser/gtk/options/geolocation_content_exceptions_window.h"
+#include "chrome/browser/gtk/options/simple_content_exceptions_window.h"
#include "chrome/browser/gtk/options/options_layout_gtk.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -171,9 +172,10 @@ void ContentFilterPageGtk::OnAllowToggled(GtkWidget* toggle_button) {
void ContentFilterPageGtk::OnExceptionsClicked(GtkWidget* button) {
if (content_type_ == CONTENT_SETTINGS_TYPE_GEOLOCATION) {
- GeolocationContentExceptionsWindow::ShowExceptionsWindow(
+ SimpleContentExceptionsWindow::ShowExceptionsWindow(
GTK_WINDOW(gtk_widget_get_toplevel(button)),
- profile()->GetGeolocationContentSettingsMap());
+ new GeolocationExceptionsTableModel(
+ profile()->GetGeolocationContentSettingsMap()));
return;
}
HostContentSettingsMap* settings_map =
diff --git a/chrome/browser/gtk/options/geolocation_content_exceptions_window.cc b/chrome/browser/gtk/options/simple_content_exceptions_window.cc
index e1e28e4..6432613 100644
--- a/chrome/browser/gtk/options/geolocation_content_exceptions_window.cc
+++ b/chrome/browser/gtk/options/simple_content_exceptions_window.cc
@@ -2,12 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/gtk/options/geolocation_content_exceptions_window.h"
+#include "chrome/browser/gtk/options/simple_content_exceptions_window.h"
#include "app/l10n_util.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
#include "chrome/browser/gtk/gtk_util.h"
#include "gfx/gtk_util.h"
#include "grit/generated_resources.h"
@@ -16,25 +15,26 @@
namespace {
// Singleton for exception window.
-GeolocationContentExceptionsWindow* instance = NULL;
+SimpleContentExceptionsWindow* instance = NULL;
} // namespace
// static
-void GeolocationContentExceptionsWindow::ShowExceptionsWindow(
- GtkWindow* parent, GeolocationContentSettingsMap* map) {
- DCHECK(map);
+void SimpleContentExceptionsWindow::ShowExceptionsWindow(
+ GtkWindow* parent, RemoveRowsTableModel* model) {
+ DCHECK(model);
+ scoped_ptr<RemoveRowsTableModel> owned_model(model);
if (!instance) {
- instance = new GeolocationContentExceptionsWindow(parent, map);
+ instance = new SimpleContentExceptionsWindow(parent, owned_model.release());
} else {
gtk_util::PresentWindow(instance->dialog_, 0);
}
}
-GeolocationContentExceptionsWindow::GeolocationContentExceptionsWindow(
+SimpleContentExceptionsWindow::SimpleContentExceptionsWindow(
GtkWindow* parent,
- GeolocationContentSettingsMap* map) {
+ RemoveRowsTableModel* model) {
// Build the model adapters that translate views and TableModels into
// something GTK can use.
list_store_ = gtk_list_store_new(COL_COUNT, G_TYPE_STRING, G_TYPE_STRING);
@@ -63,7 +63,7 @@ GeolocationContentExceptionsWindow::GeolocationContentExceptionsWindow(
G_CALLBACK(OnTreeSelectionChangedThunk), this);
// Bind |list_store_| to our C++ model.
- model_.reset(new GeolocationExceptionsTableModel(map));
+ model_.reset(model);
model_adapter_.reset(new gtk_tree::TableAdapter(this, list_store_,
model_.get()));
// Force a reload of everything to copy data into |list_store_|.
@@ -124,7 +124,7 @@ GeolocationContentExceptionsWindow::GeolocationContentExceptionsWindow(
g_signal_connect(dialog_, "destroy", G_CALLBACK(OnWindowDestroyThunk), this);
}
-void GeolocationContentExceptionsWindow::SetColumnValues(int row,
+void SimpleContentExceptionsWindow::SetColumnValues(int row,
GtkTreeIter* iter) {
std::wstring hostname = model_->GetText(row, IDS_EXCEPTIONS_HOSTNAME_HEADER);
gtk_list_store_set(list_store_, iter, COL_HOSTNAME,
@@ -135,42 +135,42 @@ void GeolocationContentExceptionsWindow::SetColumnValues(int row,
WideToUTF8(action).c_str(), -1);
}
-void GeolocationContentExceptionsWindow::UpdateButtonState() {
+void SimpleContentExceptionsWindow::UpdateButtonState() {
int row_count = gtk_tree_model_iter_n_children(
GTK_TREE_MODEL(list_store_), NULL);
- GeolocationExceptionsTableModel::Rows rows;
+ RemoveRowsTableModel::Rows rows;
GetSelectedRows(&rows);
gtk_widget_set_sensitive(remove_button_, model_->CanRemoveRows(rows));
gtk_widget_set_sensitive(remove_all_button_, row_count > 0);
}
-void GeolocationContentExceptionsWindow::GetSelectedRows(
- GeolocationExceptionsTableModel::Rows* rows) {
+void SimpleContentExceptionsWindow::GetSelectedRows(
+ RemoveRowsTableModel::Rows* rows) {
std::set<int> indices;
gtk_tree::GetSelectedIndices(treeview_selection_, &indices);
for (std::set<int>::iterator i = indices.begin(); i != indices.end(); ++i)
rows->insert(*i);
}
-void GeolocationContentExceptionsWindow::Remove(GtkWidget* widget) {
- GeolocationExceptionsTableModel::Rows rows;
+void SimpleContentExceptionsWindow::Remove(GtkWidget* widget) {
+ RemoveRowsTableModel::Rows rows;
GetSelectedRows(&rows);
model_->RemoveRows(rows);
UpdateButtonState();
}
-void GeolocationContentExceptionsWindow::RemoveAll(GtkWidget* widget) {
+void SimpleContentExceptionsWindow::RemoveAll(GtkWidget* widget) {
model_->RemoveAll();
UpdateButtonState();
}
-void GeolocationContentExceptionsWindow::OnWindowDestroy(GtkWidget* widget) {
+void SimpleContentExceptionsWindow::OnWindowDestroy(GtkWidget* widget) {
instance = NULL;
MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
-void GeolocationContentExceptionsWindow::OnTreeSelectionChanged(
+void SimpleContentExceptionsWindow::OnTreeSelectionChanged(
GtkWidget* selection) {
UpdateButtonState();
}
diff --git a/chrome/browser/gtk/options/geolocation_content_exceptions_window.h b/chrome/browser/gtk/options/simple_content_exceptions_window.h
index 320ce2a..ce508d9 100644
--- a/chrome/browser/gtk/options/geolocation_content_exceptions_window.h
+++ b/chrome/browser/gtk/options/simple_content_exceptions_window.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_GTK_OPTIONS_GEOLOCATION_CONTENT_EXCEPTIONS_WINDOW_H_
-#define CHROME_BROWSER_GTK_OPTIONS_GEOLOCATION_CONTENT_EXCEPTIONS_WINDOW_H_
+#ifndef CHROME_BROWSER_GTK_OPTIONS_SIMPLE_CONTENT_EXCEPTIONS_WINDOW_H_
+#define CHROME_BROWSER_GTK_OPTIONS_SIMPLE_CONTENT_EXCEPTIONS_WINDOW_H_
#include <gtk/gtk.h>
@@ -11,18 +11,17 @@
#include "app/gtk_signal.h"
#include "base/scoped_ptr.h"
-#include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
#include "chrome/browser/gtk/gtk_tree.h"
+#include "chrome/browser/remove_rows_table_model.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_types.h"
-class GeolocationContentSettingsMap;
-
-class GeolocationContentExceptionsWindow
+class SimpleContentExceptionsWindow
: public gtk_tree::TableAdapter::Delegate {
public:
+ // Takes ownership of |model|.
static void ShowExceptionsWindow(GtkWindow* parent,
- GeolocationContentSettingsMap* map);
+ RemoveRowsTableModel* model);
// gtk_tree::TableAdapter::Delegate implementation:
virtual void SetColumnValues(int row, GtkTreeIter* iter);
@@ -35,21 +34,22 @@ class GeolocationContentExceptionsWindow
COL_COUNT
};
- GeolocationContentExceptionsWindow(GtkWindow* parent,
- GeolocationContentSettingsMap* map);
+ // Takes ownership of |model|.
+ SimpleContentExceptionsWindow(GtkWindow* parent,
+ RemoveRowsTableModel* model);
// Updates which buttons are enabled.
void UpdateButtonState();
- void GetSelectedRows(GeolocationExceptionsTableModel::Rows* rows);
+ void GetSelectedRows(RemoveRowsTableModel::Rows* rows);
// Callbacks for the buttons.
- CHROMEGTK_CALLBACK_0(GeolocationContentExceptionsWindow, void, Remove);
- CHROMEGTK_CALLBACK_0(GeolocationContentExceptionsWindow, void, RemoveAll);
+ CHROMEGTK_CALLBACK_0(SimpleContentExceptionsWindow, void, Remove);
+ CHROMEGTK_CALLBACK_0(SimpleContentExceptionsWindow, void, RemoveAll);
- CHROMEGTK_CALLBACK_0(GeolocationContentExceptionsWindow, void,
+ CHROMEGTK_CALLBACK_0(SimpleContentExceptionsWindow, void,
OnWindowDestroy);
- CHROMEGTK_CALLBACK_0(GeolocationContentExceptionsWindow, void,
+ CHROMEGTK_CALLBACK_0(SimpleContentExceptionsWindow, void,
OnTreeSelectionChanged);
// The list presented in |treeview_|; a gobject instead of a C++ object.
@@ -57,7 +57,7 @@ class GeolocationContentExceptionsWindow
// The C++, views-ish, cross-platform model class that actually contains the
// gold standard data.
- scoped_ptr<GeolocationExceptionsTableModel> model_;
+ scoped_ptr<RemoveRowsTableModel> model_;
// The adapter that ferries data back and forth between |model_| and
// |list_store_| whenever either of them change.
@@ -77,4 +77,4 @@ class GeolocationContentExceptionsWindow
GtkWidget* remove_all_button_;
};
-#endif // CHROME_BROWSER_GTK_OPTIONS_GEOLOCATION_CONTENT_EXCEPTIONS_WINDOW_H_
+#endif // CHROME_BROWSER_GTK_OPTIONS_SIMPLE_CONTENT_EXCEPTIONS_WINDOW_H_
diff --git a/chrome/browser/views/options/content_filter_page_view.cc b/chrome/browser/views/options/content_filter_page_view.cc
index 58f7c63..986392e 100644
--- a/chrome/browser/views/options/content_filter_page_view.cc
+++ b/chrome/browser/views/options/content_filter_page_view.cc
@@ -6,9 +6,10 @@
#include "app/l10n_util.h"
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
+#include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/views/options/exceptions_view.h"
-#include "chrome/browser/views/options/geolocation_exceptions_view.h"
+#include "chrome/browser/views/options/simple_content_exceptions_view.h"
#include "grit/generated_resources.h"
#include "views/controls/button/radio_button.h"
#include "views/grid_layout.h"
@@ -155,9 +156,10 @@ void ContentFilterPageView::ButtonPressed(views::Button* sender,
const views::Event& event) {
if (sender == exceptions_button_) {
if (content_type_ == CONTENT_SETTINGS_TYPE_GEOLOCATION) {
- GeolocationExceptionsView::ShowExceptionsWindow(
+ SimpleContentExceptionsView::ShowExceptionsWindow(
GetWindow()->GetNativeWindow(),
- profile()->GetGeolocationContentSettingsMap());
+ new GeolocationExceptionsTableModel(
+ profile()->GetGeolocationContentSettingsMap()));
} else {
ExceptionsView::ShowExceptionsWindow(GetWindow()->GetNativeWindow(),
profile()->GetHostContentSettingsMap(), content_type_);
diff --git a/chrome/browser/views/options/geolocation_exceptions_view.cc b/chrome/browser/views/options/simple_content_exceptions_view.cc
index 4adff3b..3a241d2 100644
--- a/chrome/browser/views/options/geolocation_exceptions_view.cc
+++ b/chrome/browser/views/options/simple_content_exceptions_view.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/views/options/geolocation_exceptions_view.h"
+#include "chrome/browser/views/options/simple_content_exceptions_view.h"
#include <algorithm>
#include <vector>
@@ -18,14 +18,15 @@
#include "views/window/window.h"
static const int kExceptionsViewInsetSize = 5;
-static GeolocationExceptionsView* instance = NULL;
+static SimpleContentExceptionsView* instance = NULL;
// static
-void GeolocationExceptionsView::ShowExceptionsWindow(
+void SimpleContentExceptionsView::ShowExceptionsWindow(
gfx::NativeWindow parent,
- GeolocationContentSettingsMap* map) {
+ RemoveRowsTableModel* model) {
+ scoped_ptr<RemoveRowsTableModel> owned_model(model);
if (!instance) {
- instance = new GeolocationExceptionsView(map);
+ instance = new SimpleContentExceptionsView(owned_model.release());
views::Window::CreateChromeWindow(parent, gfx::Rect(), instance);
}
@@ -33,21 +34,21 @@ void GeolocationExceptionsView::ShowExceptionsWindow(
instance->window()->Show();
}
-GeolocationExceptionsView::~GeolocationExceptionsView() {
+SimpleContentExceptionsView::~SimpleContentExceptionsView() {
instance = NULL;
table_->SetModel(NULL);
}
-void GeolocationExceptionsView::OnSelectionChanged() {
+void SimpleContentExceptionsView::OnSelectionChanged() {
UpdateButtonState();
}
-void GeolocationExceptionsView::OnTableViewDelete(
+void SimpleContentExceptionsView::OnTableViewDelete(
views::TableView* table_view) {
Remove();
}
-void GeolocationExceptionsView::ButtonPressed(views::Button* sender,
+void SimpleContentExceptionsView::ButtonPressed(views::Button* sender,
const views::Event& event) {
switch (sender->tag()) {
case IDS_EXCEPTIONS_REMOVEALL_BUTTON:
@@ -61,7 +62,7 @@ void GeolocationExceptionsView::ButtonPressed(views::Button* sender,
}
}
-void GeolocationExceptionsView::Layout() {
+void SimpleContentExceptionsView::Layout() {
views::NativeButton* buttons[] = { remove_button_, remove_all_button_ };
// The buttons are placed in the parent, but we need to lay them out.
@@ -79,32 +80,32 @@ void GeolocationExceptionsView::Layout() {
View::Layout();
}
-gfx::Size GeolocationExceptionsView::GetPreferredSize() {
+gfx::Size SimpleContentExceptionsView::GetPreferredSize() {
return gfx::Size(views::Window::GetLocalizedContentsSize(
IDS_GEOLOCATION_EXCEPTION_DIALOG_WIDTH_CHARS,
IDS_GEOLOCATION_EXCEPTION_DIALOG_HEIGHT_LINES));
}
-void GeolocationExceptionsView::ViewHierarchyChanged(bool is_add,
+void SimpleContentExceptionsView::ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child) {
if (is_add && child == this)
Init();
}
-std::wstring GeolocationExceptionsView::GetWindowTitle() const {
+std::wstring SimpleContentExceptionsView::GetWindowTitle() const {
return l10n_util::GetString(IDS_GEOLOCATION_EXCEPTION_TITLE);
}
-GeolocationExceptionsView::GeolocationExceptionsView(
- GeolocationContentSettingsMap* map)
- : model_(map),
+SimpleContentExceptionsView::SimpleContentExceptionsView(
+ RemoveRowsTableModel* model)
+ : model_(model),
table_(NULL),
remove_button_(NULL),
remove_all_button_(NULL) {
}
-void GeolocationExceptionsView::Init() {
+void SimpleContentExceptionsView::Init() {
if (table_)
return; // We've already Init'd.
@@ -117,8 +118,8 @@ void GeolocationExceptionsView::Init() {
columns.push_back(
TableColumn(IDS_EXCEPTIONS_ACTION_HEADER, TableColumn::LEFT, -1, .25));
columns.back().sortable = true;
- table_ = new views::TableView(&model_, columns, views::TEXT_ONLY, false, true,
- false);
+ table_ = new views::TableView(model_.get(), columns, views::TEXT_ONLY,
+ false, true, false);
views::TableView::SortDescriptors sort;
sort.push_back(
views::TableView::SortDescriptor(IDS_EXCEPTIONS_HOSTNAME_HEADER, true));
@@ -155,26 +156,26 @@ void GeolocationExceptionsView::Init() {
UpdateButtonState();
}
-GeolocationExceptionsTableModel::Rows
- GeolocationExceptionsView::GetSelectedRows() const {
- GeolocationExceptionsTableModel::Rows rows;
+RemoveRowsTableModel::Rows
+ SimpleContentExceptionsView::GetSelectedRows() const {
+ RemoveRowsTableModel::Rows rows;
for (views::TableView::iterator i(table_->SelectionBegin());
i != table_->SelectionEnd(); ++i)
rows.insert(*i);
return rows;
}
-void GeolocationExceptionsView::UpdateButtonState() {
- remove_button_->SetEnabled(model_.CanRemoveRows(GetSelectedRows()));
- remove_all_button_->SetEnabled(model_.RowCount() > 0);
+void SimpleContentExceptionsView::UpdateButtonState() {
+ remove_button_->SetEnabled(model_->CanRemoveRows(GetSelectedRows()));
+ remove_all_button_->SetEnabled(model_->RowCount() > 0);
}
-void GeolocationExceptionsView::Remove() {
- model_.RemoveRows(GetSelectedRows());
+void SimpleContentExceptionsView::Remove() {
+ model_->RemoveRows(GetSelectedRows());
UpdateButtonState();
}
-void GeolocationExceptionsView::RemoveAll() {
- model_.RemoveAll();
+void SimpleContentExceptionsView::RemoveAll() {
+ model_->RemoveAll();
UpdateButtonState();
}
diff --git a/chrome/browser/views/options/geolocation_exceptions_view.h b/chrome/browser/views/options/simple_content_exceptions_view.h
index 417b9f3..2762740 100644
--- a/chrome/browser/views/options/geolocation_exceptions_view.h
+++ b/chrome/browser/views/options/simple_content_exceptions_view.h
@@ -2,40 +2,37 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_VIEWS_OPTIONS_GEOLOCATION_EXCEPTIONS_VIEW_H_
-#define CHROME_BROWSER_VIEWS_OPTIONS_GEOLOCATION_EXCEPTIONS_VIEW_H_
+#ifndef CHROME_BROWSER_VIEWS_OPTIONS_SIMPLE_CONTENT_EXCEPTIONS_VIEW_H_
+#define CHROME_BROWSER_VIEWS_OPTIONS_SIMPLE_CONTENT_EXCEPTIONS_VIEW_H_
#include <string>
-#include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
+#include "chrome/browser/remove_rows_table_model.h"
#include "chrome/common/content_settings.h"
#include "views/controls/button/button.h"
#include "views/controls/table/table_view_observer.h"
#include "views/window/dialog_delegate.h"
-class GeolocationContentSettingsMap;
-
namespace views {
class NativeButton;
class TableView;
}
-// GeolocationExceptionsView is responsible for showing the user the set of
-// site-specific geolocation permissions. The exceptions are shown in a table
-// view by way of a GeolocationExceptionsTableModel. The user can remove
-// exceptions.
+// SimpleContentExceptionsView is responsible for showing the user the set of
+// site-specific permissions. The exceptions are shown in a table view by way
+// of a RemoveRowsTableModel. The user can remove exceptions.
// Use the ShowExceptionsWindow method to create and show a
-// GeolocationExceptionsView, which is deleted when the window closes.
-class GeolocationExceptionsView : public views::View,
- public views::ButtonListener,
- public views::DialogDelegate,
- public views::TableViewObserver {
+// SimpleContentExceptionsView, which is deleted when the window closes.
+class SimpleContentExceptionsView : public views::View,
+ public views::ButtonListener,
+ public views::DialogDelegate,
+ public views::TableViewObserver {
public:
- // Shows the Exceptions window.
+ // Shows the Exceptions window. Takes ownership of |model|.
static void ShowExceptionsWindow(gfx::NativeWindow parent,
- GeolocationContentSettingsMap* map);
+ RemoveRowsTableModel* model);
- virtual ~GeolocationExceptionsView();
+ virtual ~SimpleContentExceptionsView();
// TableViewObserver overrides:
virtual void OnSelectionChanged();
@@ -60,7 +57,8 @@ class GeolocationExceptionsView : public views::View,
virtual views::View* GetContentsView() { return this; }
private:
- explicit GeolocationExceptionsView(GeolocationContentSettingsMap* map);
+ // Takes ownership of |model|.
+ explicit SimpleContentExceptionsView(RemoveRowsTableModel* model);
void Init();
@@ -68,7 +66,7 @@ class GeolocationExceptionsView : public views::View,
void UpdateButtonState();
// Returns the set of selected rows.
- GeolocationExceptionsTableModel::Rows GetSelectedRows() const;
+ RemoveRowsTableModel::Rows GetSelectedRows() const;
// Removes the selected item.
void Remove();
@@ -77,15 +75,15 @@ class GeolocationExceptionsView : public views::View,
void RemoveAll();
// The model displayed in the table.
- GeolocationExceptionsTableModel model_;
+ scoped_ptr<RemoveRowsTableModel> model_;
views::TableView* table_;
views::NativeButton* remove_button_;
views::NativeButton* remove_all_button_;
- DISALLOW_COPY_AND_ASSIGN(GeolocationExceptionsView);
+ DISALLOW_COPY_AND_ASSIGN(SimpleContentExceptionsView);
};
-#endif // CHROME_BROWSER_VIEWS_OPTIONS_GEOLOCATION_EXCEPTIONS_VIEW_H_
+#endif // CHROME_BROWSER_VIEWS_OPTIONS_SIMPLE_CONTENT_EXCEPTIONS_VIEW_H_
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 6e7753a..1f9b302 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -768,8 +768,6 @@
'browser/cocoa/fullscreen_controller.mm',
'browser/cocoa/fullscreen_window.h',
'browser/cocoa/fullscreen_window.mm',
- 'browser/cocoa/geolocation_exceptions_window_controller.h',
- 'browser/cocoa/geolocation_exceptions_window_controller.mm',
'browser/cocoa/gradient_button_cell.h',
'browser/cocoa/gradient_button_cell.mm',
'browser/cocoa/history_menu_bridge.h',
@@ -867,6 +865,8 @@
'browser/cocoa/side_tab_strip_controller.mm',
'browser/cocoa/side_tab_strip_view.h',
'browser/cocoa/side_tab_strip_view.mm',
+ 'browser/cocoa/simple_content_exceptions_window_controller.h',
+ 'browser/cocoa/simple_content_exceptions_window_controller.mm',
'browser/cocoa/status_bubble_mac.h',
'browser/cocoa/status_bubble_mac.mm',
'browser/cocoa/status_icons/status_icon_mac.h',
@@ -1484,8 +1484,6 @@
'browser/gtk/options/fonts_languages_window_gtk.cc',
'browser/gtk/options/fonts_page_gtk.cc',
'browser/gtk/options/fonts_page_gtk.h',
- 'browser/gtk/options/geolocation_content_exceptions_window.cc',
- 'browser/gtk/options/geolocation_content_exceptions_window.h',
'browser/gtk/options/general_page_gtk.cc',
'browser/gtk/options/general_page_gtk.h',
'browser/gtk/options/languages_page_gtk.cc',
@@ -1501,6 +1499,8 @@
'browser/gtk/options/passwords_exceptions_window_gtk.h',
'browser/gtk/options/passwords_page_gtk.cc',
'browser/gtk/options/passwords_page_gtk.h',
+ 'browser/gtk/options/simple_content_exceptions_window.cc',
+ 'browser/gtk/options/simple_content_exceptions_window.h',
'browser/gtk/options/url_picker_dialog_gtk.cc',
'browser/gtk/options/url_picker_dialog_gtk.h',
'browser/gtk/page_info_window_gtk.cc',
@@ -2593,8 +2593,6 @@
'browser/views/options/fonts_page_view.h',
'browser/views/options/general_page_view.cc',
'browser/views/options/general_page_view.h',
- 'browser/views/options/geolocation_exceptions_view.cc',
- 'browser/views/options/geolocation_exceptions_view.h',
'browser/views/options/languages_page_view.cc',
'browser/views/options/languages_page_view.h',
'browser/views/options/options_group_view.cc',
@@ -2608,6 +2606,8 @@
'browser/views/options/passwords_page_view.h',
'browser/views/options/plugin_filter_page_view.cc',
'browser/views/options/plugin_filter_page_view.h',
+ 'browser/views/options/simple_content_exceptions_view.cc',
+ 'browser/views/options/simple_content_exceptions_view.h',
'browser/views/page_info_window_view.cc',
'browser/views/pinned_contents_info_bubble.cc',
'browser/views/pinned_contents_info_bubble.h',
@@ -2955,7 +2955,6 @@
'app/nibs/FirstRunBubble.xib',
'app/nibs/FirstRunDialog.xib',
'app/nibs/FontLanguageSettings.xib',
- 'app/nibs/GeolocationExceptionsWindow.xib',
'app/nibs/HttpAuthLoginSheet.xib',
'app/nibs/HungRendererDialog.xib',
'app/nibs/ImportSettingsDialog.xib',
@@ -2966,6 +2965,7 @@
'app/nibs/ReportBug.xib',
'app/nibs/SadTab.xib',
'app/nibs/SaveAccessoryView.xib',
+ 'app/nibs/SimpleContentExceptionsWindow.xib',
'app/nibs/SyncCustomize.xib',
'app/nibs/TaskManager.xib',
'app/nibs/Toolbar.xib',
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi
index 91298cb..21cb94a 100644
--- a/chrome/chrome_dll.gypi
+++ b/chrome/chrome_dll.gypi
@@ -225,7 +225,6 @@
'app/nibs/FirstRunBubble.xib',
'app/nibs/FirstRunDialog.xib',
'app/nibs/FontLanguageSettings.xib',
- 'app/nibs/GeolocationExceptionsWindow.xib',
'app/nibs/HungRendererDialog.xib',
'app/nibs/HttpAuthLoginSheet.xib',
'app/nibs/ImportSettingsDialog.xib',
@@ -239,6 +238,7 @@
'app/nibs/ReportBug.xib',
'app/nibs/SaveAccessoryView.xib',
'app/nibs/SadTab.xib',
+ 'app/nibs/SimpleContentExceptionsWindow.xib',
'app/nibs/SyncCustomize.xib',
'app/nibs/TabContents.xib',
'app/nibs/TabView.xib',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index f126f52..9784686 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -717,7 +717,6 @@
'browser/cocoa/focus_tracker_unittest.mm',
'browser/cocoa/font_language_settings_controller_unittest.mm',
'browser/cocoa/fullscreen_window_unittest.mm',
- 'browser/cocoa/geolocation_exceptions_window_controller_unittest.mm',
'browser/cocoa/gradient_button_cell_unittest.mm',
'browser/cocoa/history_menu_bridge_unittest.mm',
'browser/cocoa/history_menu_cocoa_controller_unittest.mm',
@@ -751,6 +750,7 @@
'browser/cocoa/sad_tab_view_unittest.mm',
'browser/cocoa/search_engine_list_model_unittest.mm',
'browser/cocoa/side_tab_strip_view_unittest.mm',
+ 'browser/cocoa/simple_content_exceptions_window_controller_unittest.mm',
'browser/cocoa/status_bubble_mac_unittest.mm',
'browser/cocoa/status_icons/status_icon_mac_unittest.mm',
'browser/cocoa/styled_text_field_cell_unittest.mm',