diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 04:34:43 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 04:34:43 +0000 |
commit | 354bcbaf8603cb5800737f86a84ee465166b2b4e (patch) | |
tree | 863753d52b8f9dfb54e676bbf3d1b38a968df061 /chrome_frame/navigation_constraints.h | |
parent | 0e097f90d5bba038b5826ebac2870aadde28d2ca (diff) | |
download | chromium_src-354bcbaf8603cb5800737f86a84ee465166b2b4e.zip chromium_src-354bcbaf8603cb5800737f86a84ee465166b2b4e.tar.gz chromium_src-354bcbaf8603cb5800737f86a84ee465166b2b4e.tar.bz2 |
Add support for gcf:about:plugins in chrome frame full tab mode. The URL validation code path
in ChromeFrame now takes in an interface NavigationConstraints which allows the delegateslike
the ActiveX, ActiveDocument and the NPAPI plugins to control the navigation decisions.
We no longer refer to the InternetSecurityManager interface which is IE only for performing
zone decisions in the ChromeFrame NPAPI plugin.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=66118
BUG=66118
TEST=Covered by additional CanNavigate unit tests.
Review URL: http://codereview.chromium.org/5698005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69101 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/navigation_constraints.h')
-rw-r--r-- | chrome_frame/navigation_constraints.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome_frame/navigation_constraints.h b/chrome_frame/navigation_constraints.h new file mode 100644 index 0000000..a66cdeb --- /dev/null +++ b/chrome_frame/navigation_constraints.h @@ -0,0 +1,37 @@ +// 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. + +#ifndef CHROME_FRAME_NAVIGATION_CONSTRAINTS_H_ +#define CHROME_FRAME_NAVIGATION_CONSTRAINTS_H_ + +#include <urlmon.h> +#include <windows.h> + +#include "base/win/scoped_comptr.h" +#include "googleurl/src/gurl.h" + +// Provides an interface which controls navigation within ChromeFrame. +class NavigationConstraints { + public: + virtual ~NavigationConstraints() {} + virtual bool AllowUnsafeUrls() = 0; + virtual bool IsSchemeAllowed(const GURL& url) = 0; + virtual bool IsZoneAllowed(const GURL& url) = 0; +}; + +// Provides default implementation for the NavigationConstraints interface. +class NavigationConstraintsImpl : public NavigationConstraints { + public: + virtual ~NavigationConstraintsImpl() {} + + // NavigationConstraints method overrides. + virtual bool AllowUnsafeUrls(); + virtual bool IsSchemeAllowed(const GURL& url); + virtual bool IsZoneAllowed(const GURL& url); + private: + base::win::ScopedComPtr<IInternetSecurityManager> security_manager_; +}; + +#endif // CHROME_FRAME_NAVIGATION_CONSTRAINTS_H_ + |