summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_plugin.h
diff options
context:
space:
mode:
authorrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 14:45:05 +0000
committerrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 14:45:05 +0000
commit0753db59d038d9a7feaf11f02e4df7587a2b4d1f (patch)
tree338094b1771c1a9d82e74e5c743d924fb01b44ec /chrome_frame/chrome_frame_plugin.h
parent74ca044ddeb27bca294a88f397e85429ce28e2b6 (diff)
downloadchromium_src-0753db59d038d9a7feaf11f02e4df7587a2b4d1f.zip
chromium_src-0753db59d038d9a7feaf11f02e4df7587a2b4d1f.tar.gz
chromium_src-0753db59d038d9a7feaf11f02e4df7587a2b4d1f.tar.bz2
Fixing a regression introduced with r69101, which now prevents Chrome Frame
from loading chrome extension URL in privileged mode using the NPAPI plugin. The behaviour that was implemented only for the ActiveX control has been moved into the base class NavigationConstraintsImpl, which both the ActieX and NPAPI plugin derive from. TEST=Added new unit tests for this case BUG=0 Review URL: http://codereview.chromium.org/5814004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_plugin.h')
-rw-r--r--chrome_frame/chrome_frame_plugin.h22
1 files changed, 7 insertions, 15 deletions
diff --git a/chrome_frame/chrome_frame_plugin.h b/chrome_frame/chrome_frame_plugin.h
index 58a76a6..7acda3c 100644
--- a/chrome_frame/chrome_frame_plugin.h
+++ b/chrome_frame/chrome_frame_plugin.h
@@ -14,6 +14,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome_frame/simple_resource_loader.h"
+#include "chrome_frame/navigation_constraints.h"
#include "chrome_frame/utils.h"
#include "grit/chromium_strings.h"
@@ -22,11 +23,11 @@
// A class to implement common functionality for all types of
// plugins: NPAPI. ActiveX and ActiveDoc
template <typename T>
-class ChromeFramePlugin : public ChromeFrameDelegateImpl {
+class ChromeFramePlugin
+ : public ChromeFrameDelegateImpl,
+ public NavigationConstraintsImpl {
public:
- ChromeFramePlugin()
- : ignore_setfocus_(false),
- is_privileged_(false) {
+ ChromeFramePlugin() : ignore_setfocus_(false){
}
~ChromeFramePlugin() {
Uninitialize();
@@ -67,7 +68,7 @@ END_MSG_MAP()
DCHECK(launch_params_ == NULL);
// We don't want to do incognito when privileged, since we're
// running in browser chrome or some other privileged context.
- bool incognito_mode = !is_privileged_ && incognito;
+ bool incognito_mode = !is_privileged() && incognito;
FilePath profile_path;
GetProfilePath(profile_name, &profile_path);
// The profile name could change based on the browser version. For e.g. for
@@ -99,7 +100,7 @@ END_MSG_MAP()
virtual void OnAutomationServerReady() {
// Issue the extension automation request if we're privileged to
// allow this control to handle extension requests from Chrome.
- if (is_privileged_ && IsValid())
+ if (is_privileged() && IsValid())
automation_client_->SetEnableExtensionAutomation(functions_enabled_);
}
@@ -261,14 +262,6 @@ END_MSG_MAP()
// When the flag is not set, we transfer the focus to chrome.
bool ignore_setfocus_;
- // The plugin is privileged if it is:
- // * Invoked by a window running under the system principal in FireFox.
- // * Being hosted by a custom host exposing the SID_ChromeFramePrivileged
- // service.
- //
- // When privileged, additional interfaces are made available to the user.
- bool is_privileged_;
-
// List of functions to enable for automation, or a single entry "*" to
// enable all functions for automation. Ignored unless is_privileged_ is
// true. Defaults to the empty list, meaning automation will not be
@@ -277,4 +270,3 @@ END_MSG_MAP()
};
#endif // CHROME_FRAME_CHROME_FRAME_PLUGIN_H_
-