OLD | NEW |
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 // Implementation of ChromeActiveDocument | 5 // Implementation of ChromeActiveDocument |
6 #include "chrome_frame/chrome_active_document.h" | 6 #include "chrome_frame/chrome_active_document.h" |
7 | 7 |
8 #include <hlink.h> | 8 #include <hlink.h> |
9 #include <htiface.h> | 9 #include <htiface.h> |
10 #include <initguid.h> | 10 #include <initguid.h> |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 LPMSG msg, | 135 LPMSG msg, |
136 IOleClientSite* active_site, | 136 IOleClientSite* active_site, |
137 LONG index, | 137 LONG index, |
138 HWND parent_window, | 138 HWND parent_window, |
139 LPCRECT pos) { | 139 LPCRECT pos) { |
140 // IE will try and in-place activate us in some cases. This happens when | 140 // IE will try and in-place activate us in some cases. This happens when |
141 // the user opens a new IE window with a URL that has us as the DocObject. | 141 // the user opens a new IE window with a URL that has us as the DocObject. |
142 // Here we refuse to be activated in-place and we will force IE to UIActivate | 142 // Here we refuse to be activated in-place and we will force IE to UIActivate |
143 // us. | 143 // us. |
144 if (OLEIVERB_INPLACEACTIVATE == verb) | 144 if (OLEIVERB_INPLACEACTIVATE == verb) |
145 return E_NOTIMPL; | 145 return OLEOBJ_E_INVALIDVERB; |
146 // Check if we should activate as a docobject or not | 146 // Check if we should activate as a docobject or not |
147 // (client supports IOleDocumentSite) | 147 // (client supports IOleDocumentSite) |
148 if (doc_site_) { | 148 if (doc_site_) { |
149 switch (verb) { | 149 switch (verb) { |
150 case OLEIVERB_SHOW: { | 150 case OLEIVERB_SHOW: { |
151 ScopedComPtr<IDocHostUIHandler> doc_host_handler; | 151 ScopedComPtr<IDocHostUIHandler> doc_host_handler; |
152 doc_host_handler.QueryFrom(doc_site_); | 152 doc_host_handler.QueryFrom(doc_site_); |
153 if (doc_host_handler.get()) | 153 if (doc_host_handler.get()) |
154 doc_host_handler->ShowUI(DOCHOSTUITYPE_BROWSE, this, this, NULL, NULL); | 154 doc_host_handler->ShowUI(DOCHOSTUITYPE_BROWSE, this, this, NULL, NULL); |
155 } | 155 } |
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 | 1332 |
1333 if (new_navigation_info.url != navigation_info_.url) | 1333 if (new_navigation_info.url != navigation_info_.url) |
1334 return true; | 1334 return true; |
1335 | 1335 |
1336 if (new_navigation_info.referrer != navigation_info_.referrer) | 1336 if (new_navigation_info.referrer != navigation_info_.referrer) |
1337 return true; | 1337 return true; |
1338 | 1338 |
1339 return false; | 1339 return false; |
1340 } | 1340 } |
1341 | 1341 |
OLD | NEW |