| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 IOleClientSite* client_site) { | 379 IOleClientSite* client_site) { |
| 380 if (client_site == NULL) { | 380 if (client_site == NULL) { |
| 381 ChromeActiveDocument* cached_document = g_active_doc_cache.Get(); | 381 ChromeActiveDocument* cached_document = g_active_doc_cache.Get(); |
| 382 if (cached_document) { | 382 if (cached_document) { |
| 383 DCHECK(this == cached_document); | 383 DCHECK(this == cached_document); |
| 384 g_active_doc_cache.Set(NULL); | 384 g_active_doc_cache.Set(NULL); |
| 385 cached_document->Release(); | 385 cached_document->Release(); |
| 386 } | 386 } |
| 387 | 387 |
| 388 ScopedComPtr<IDocHostUIHandler> doc_host_handler; | 388 ScopedComPtr<IDocHostUIHandler> doc_host_handler; |
| 389 doc_host_handler.QueryFrom(doc_site_); | 389 if (doc_site_) { |
| 390 doc_host_handler.QueryFrom(doc_site_); |
| 391 } |
| 390 | 392 |
| 391 if (doc_host_handler.get()) { | 393 if (doc_host_handler.get()) { |
| 392 doc_host_handler->HideUI(); | 394 doc_host_handler->HideUI(); |
| 393 } | 395 } |
| 394 | 396 |
| 395 doc_site_.Release(); | 397 doc_site_.Release(); |
| 396 in_place_frame_.Release(); | 398 in_place_frame_.Release(); |
| 397 } | 399 } |
| 398 | 400 |
| 399 if (client_site != m_spClientSite) | 401 if (client_site != m_spClientSite) |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1008 ScopedComPtr<IWebBrowser2> web_browser2; | 1010 ScopedComPtr<IWebBrowser2> web_browser2; |
| 1009 DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive()); | 1011 DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive()); |
| 1010 DCHECK(web_browser2); | 1012 DCHECK(web_browser2); |
| 1011 | 1013 |
| 1012 if (web_browser2) { | 1014 if (web_browser2) { |
| 1013 web_browser2->GoBack(); | 1015 web_browser2->GoBack(); |
| 1014 } | 1016 } |
| 1015 return 0; | 1017 return 0; |
| 1016 } | 1018 } |
| 1017 | 1019 |
| OLD | NEW |