summaryrefslogtreecommitdiffstats
path: root/chrome/browser/mock_plugin_exceptions_table_model.cc
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-15 15:38:44 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-15 15:38:44 +0000
commit0cd07f946c353e33d0b9474d383ab06612e40bd8 (patch)
treec3b05021da46c9f489d5b359f53a3e3f36f02ae7 /chrome/browser/mock_plugin_exceptions_table_model.cc
parente19f6b1bb2e8d09ae7471f10d56c834a250182c5 (diff)
downloadchromium_src-0cd07f946c353e33d0b9474d383ab06612e40bd8.zip
chromium_src-0cd07f946c353e33d0b9474d383ab06612e40bd8.tar.gz
chromium_src-0cd07f946c353e33d0b9474d383ab06612e40bd8.tar.bz2
[Mac] Add per-plugin exceptions to content settings.
Screenshot: http://www.dropmocks.com/mXMd I'm adding a subclass of NSArrayController, TableModelArrayController, that binds to a RemoveRowsTableModel that can use groups and displays them using group rows in an NSTableView. This cleans up SimpleContentExceptionsWindowController a lot, and the class could also be used for other table models that use groups (keyword editor and autofill). XIB changes: In SimpleContentExceptionsWindow.xib, bind table view to TableModelArrayController instead of using the dataSource outlet. Buttons call actions on TableModelArrayController, and table view delegate also points to it. BUG=39252 TEST=SimpleContentExceptionsWindowControllerTest.*:TableModelArrayControllerTest.*:PluginExceptionsTableModelTest.* Review URL: http://codereview.chromium.org/3327016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/mock_plugin_exceptions_table_model.cc')
-rw-r--r--chrome/browser/mock_plugin_exceptions_table_model.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/mock_plugin_exceptions_table_model.cc b/chrome/browser/mock_plugin_exceptions_table_model.cc
new file mode 100644
index 0000000..d74dfa0
--- /dev/null
+++ b/chrome/browser/mock_plugin_exceptions_table_model.cc
@@ -0,0 +1,17 @@
+// 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.
+
+#include "chrome/browser/mock_plugin_exceptions_table_model.h"
+
+#include "webkit/glue/plugins/webplugininfo.h"
+
+void MockPluginExceptionsTableModel::set_plugins(
+ const std::vector<WebPluginInfo>& plugins) {
+ plugins_ = plugins;
+}
+
+void MockPluginExceptionsTableModel::GetPlugins(
+ std::vector<WebPluginInfo>* plugins) {
+ *plugins = plugins_;
+}