diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-16 10:04:36 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-16 10:04:36 +0000 |
commit | 066d879745b30f0a9f2e4671880cf5de3ec72b08 (patch) | |
tree | bbb1d02f6880274421ab360946b239276d8f494f /webkit/plugins/npapi/plugin_group.h | |
parent | 0d146bf5d1b7302156e986970125dc98ae7a3d28 (diff) | |
download | chromium_src-066d879745b30f0a9f2e4671880cf5de3ec72b08.zip chromium_src-066d879745b30f0a9f2e4671880cf5de3ec72b08.tar.gz chromium_src-066d879745b30f0a9f2e4671880cf5de3ec72b08.tar.bz2 |
Correctly update description and version when changing a PluginGroup.
PluginListTest:UpdatedPlugin tests that we don't regress on updating a disabled plugin.
BUG=72946
TEST=PluginGroupTest.MultipleVersions:PluginListTest:UpdatedPlugin
Review URL: http://codereview.chromium.org/6525012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/npapi/plugin_group.h')
-rw-r--r-- | webkit/plugins/npapi/plugin_group.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/webkit/plugins/npapi/plugin_group.h b/webkit/plugins/npapi/plugin_group.h index c1e77b8..9e0250c 100644 --- a/webkit/plugins/npapi/plugin_group.h +++ b/webkit/plugins/npapi/plugin_group.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -232,15 +232,17 @@ class PluginGroup { // enabled one, or if all plugins are disabled, simply the first one. void UpdateActivePlugin(const WebPluginInfo& plugin); - // Refreshes the enabled flag based on the state of its plugins. - void RefreshEnabledState(); + // Resets the group state to its default value (as if the group was empty). + // After calling this method, calling |UpdateActivePlugin| with all plugins + // in a row will correctly set the group state. + void ResetGroupState(); // Enables the plugin if not already enabled and if policy allows it to. - // Returns true on success. + // Returns true on success. Does not update the group state. static bool Enable(WebPluginInfo* plugin, int reason); // Disables the plugin if not already disabled and if policy allows it to. - // Returns true on success. + // Returns true on success. Does not update the group state. static bool Disable(WebPluginInfo* plugin, int reason); // Returns a non-const vector of all plugins in the group. This is only used |