Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: chrome_frame/chrome_frame_activex_base.h

Issue 5698005: Add support for gcf:about:plugins in chrome frame full tab mode. The URL vali... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/chrome_frame.gyp ('k') | chrome_frame/chrome_frame_automation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_frame_activex_base.h
===================================================================
--- chrome_frame/chrome_frame_activex_base.h (revision 68895)
+++ chrome_frame/chrome_frame_activex_base.h (working copy)
@@ -29,6 +29,7 @@
#include "chrome_frame/chrome_frame_plugin.h"
#include "chrome_frame/com_message_event.h"
#include "chrome_frame/com_type_info_holder.h"
+#include "chrome_frame/navigation_constraints.h"
#include "chrome_frame/simple_resource_loader.h"
#include "chrome_frame/urlmon_url_request.h"
#include "chrome_frame/urlmon_url_request_private.h"
@@ -149,10 +150,6 @@
extern bool g_first_launch_by_process_;
-// Posted when the worker thread used for handling URL requests in IE finishes
-// uninitialization.
-#define WM_WORKER_THREAD_UNINITIALIZED_MSG (WM_APP + 1)
-
// Common implementation for ActiveX and Active Document
template <class T, const CLSID& class_id>
class ATL_NO_VTABLE ChromeFrameActivexBase : // NOLINT
@@ -173,7 +170,8 @@
public IPropertyNotifySinkCP<T>,
public CComCoClass<T, &class_id>,
public CComControl<T>,
- public ChromeFramePlugin<T> {
+ public ChromeFramePlugin<T>,
+ public NavigationConstraintsImpl {
protected:
typedef std::set<base::win::ScopedComPtr<IDispatch> > EventHandlers;
typedef ChromeFrameActivexBase<T, class_id> BasePlugin;
@@ -575,6 +573,20 @@
Fire_onclose();
}
+ // NavigationConstraints overrides.
+ virtual bool IsSchemeAllowed(const GURL& url) {
+ bool allowed = NavigationConstraintsImpl::IsSchemeAllowed(url);
+ if (allowed)
+ return true;
+
+ if (is_privileged_ &&
+ (url.SchemeIs(chrome::kDataScheme) ||
+ url.SchemeIs(chrome::kExtensionScheme))) {
+ return true;
+ }
+ return false;
+ }
+
// Overridden to take advantage of readystate prop changes and send those
// to potential listeners.
HRESULT FireOnChanged(DISPID dispid) {
@@ -611,7 +623,7 @@
// of navigation just after CreateExternalTab is done.
if (!automation_client_->InitiateNavigation(full_url,
GetDocumentUrl(),
- is_privileged_)) {
+ this)) {
// TODO(robertshield): Make InitiateNavigation return more useful
// error information.
return E_INVALIDARG;
« no previous file with comments | « chrome_frame/chrome_frame.gyp ('k') | chrome_frame/chrome_frame_automation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698