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

Side by Side Diff: chrome_frame/bind_context_info.h

Issue 2620001: A new way of hooking internet protocols. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/bho.cc ('k') | chrome_frame/protocol_sink_wrap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_FRAME_BIND_CONTEXT_INFO_ 5 #ifndef CHROME_FRAME_BIND_CONTEXT_INFO_
6 #define CHROME_FRAME_BIND_CONTEXT_INFO_ 6 #define CHROME_FRAME_BIND_CONTEXT_INFO_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlcom.h> 9 #include <atlcom.h>
10 10
11 #include "base/scoped_bstr_win.h" 11 #include "base/scoped_bstr_win.h"
12 #include "base/scoped_comptr_win.h" 12 #include "base/scoped_comptr_win.h"
13 #include "chrome_frame/protocol_sink_wrap.h"
13 14
14 class __declspec(uuid("71CC3EC7-7E8A-457f-93BC-1090CF31CC18")) 15 class __declspec(uuid("71CC3EC7-7E8A-457f-93BC-1090CF31CC18"))
15 IBindContextInfoInternal : public IUnknown { 16 IBindContextInfoInternal : public IUnknown {
16 public: 17 public:
17 STDMETHOD(GetCppObject)(void** me) = 0; 18 STDMETHOD(GetCppObject)(void** me) = 0;
18 }; 19 };
19 20
20 // This class maintains contextual information used by ChromeFrame. 21 // This class maintains contextual information used by ChromeFrame.
21 // This information is maintained in the bind context. 22 // This information is maintained in the bind context.
22 // Association with GUID_NULL is for convenience. 23 // Association with GUID_NULL is for convenience.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 url_ = url; 74 url_ = url;
74 } else { 75 } else {
75 url_.clear(); 76 url_.clear();
76 } 77 }
77 } 78 }
78 79
79 const std::wstring& url() const { 80 const std::wstring& url() const {
80 return url_; 81 return url_;
81 } 82 }
82 83
84 void set_prot_data(ProtData* data) {
85 prot_data_ = data;
86 }
87
88 scoped_refptr<ProtData> get_prot_data() {
89 return prot_data_;
90 }
91
83 protected: 92 protected:
84 STDMETHOD(GetCppObject)(void** me) { 93 STDMETHOD(GetCppObject)(void** me) {
85 DCHECK(me); 94 DCHECK(me);
86 AddRef(); 95 AddRef();
87 *me = static_cast<BindContextInfo*>(this); 96 *me = static_cast<BindContextInfo*>(this);
88 return S_OK; 97 return S_OK;
89 } 98 }
90 99
91 HRESULT Initialize(IBindCtx* bind_ctx); 100 HRESULT Initialize(IBindCtx* bind_ctx);
92 101
93 private: 102 private:
94 ScopedComPtr<IStream> cache_; 103 ScopedComPtr<IStream> cache_;
95 bool no_cache_; 104 bool no_cache_;
96 bool chrome_request_; 105 bool chrome_request_;
97 bool is_switching_; 106 bool is_switching_;
98 std::wstring url_; 107 std::wstring url_;
99 ScopedComPtr<IUnknown> ftm_; 108 ScopedComPtr<IUnknown> ftm_;
109 scoped_refptr<ProtData> prot_data_;
100 110
101 DISALLOW_COPY_AND_ASSIGN(BindContextInfo); 111 DISALLOW_COPY_AND_ASSIGN(BindContextInfo);
102 }; 112 };
103 113
104 #endif // CHROME_FRAME_BIND_CONTEXT_INFO_ 114 #endif // CHROME_FRAME_BIND_CONTEXT_INFO_
105
OLDNEW
« no previous file with comments | « chrome_frame/bho.cc ('k') | chrome_frame/protocol_sink_wrap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698