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

Side by Side Diff: chrome_frame/chrome_active_document.cc

Issue 2895010: Handling case where automation server is NULL when creating the active doc wi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 5 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 | « no previous file | chrome_frame/chrome_frame_activex_base.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 // 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 in_place_ui_window.Receive(), 512 in_place_ui_window.Receive(),
513 &position_rect, 513 &position_rect,
514 &clip_rect, 514 &clip_rect,
515 &frame_info_); 515 &frame_info_);
516 if (!m_bWndLess) { 516 if (!m_bWndLess) {
517 if (IsWindow()) { 517 if (IsWindow()) {
518 ::ShowWindow(m_hWnd, SW_SHOW); 518 ::ShowWindow(m_hWnd, SW_SHOW);
519 SetFocus(); 519 SetFocus();
520 } else { 520 } else {
521 m_hWnd = Create(parent_window, position_rect, 0, 0, WS_EX_CLIENTEDGE); 521 m_hWnd = Create(parent_window, position_rect, 0, 0, WS_EX_CLIENTEDGE);
522 if (!IsWindow()) {
523 // This might happen if the automation server couldn't be
524 // instantiated. If so, a NOTREACHED() will have already been hit.
525 DLOG(ERROR) << "Failed to create Ax window";
526 return AtlHresultFromLastError();
527 }
522 } 528 }
523 529
524 ScopedComPtr<IWebBrowser2> web_browser2; 530 ScopedComPtr<IWebBrowser2> web_browser2;
525 DoQueryService(SID_SWebBrowserApp, m_spClientSite, 531 DoQueryService(SID_SWebBrowserApp, m_spClientSite,
526 web_browser2.Receive()); 532 web_browser2.Receive());
527 if (web_browser2) { 533 if (web_browser2) {
528 if (!dimensions_.IsEmpty()) { 534 if (!dimensions_.IsEmpty()) {
529 web_browser2->put_Width(dimensions_.width()); 535 web_browser2->put_Width(dimensions_.width());
530 web_browser2->put_Height(dimensions_.height()); 536 web_browser2->put_Height(dimensions_.height());
531 web_browser2->put_Left(dimensions_.x()); 537 web_browser2->put_Left(dimensions_.x());
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 shell_browser.Receive()); 1247 shell_browser.Receive());
1242 DCHECK(shell_browser.get() != NULL); 1248 DCHECK(shell_browser.get() != NULL);
1243 ScopedComPtr<ITridentService2> trident_services; 1249 ScopedComPtr<ITridentService2> trident_services;
1244 trident_services.QueryFrom(shell_browser); 1250 trident_services.QueryFrom(shell_browser);
1245 if (trident_services) 1251 if (trident_services)
1246 trident_services->FirePrivacyImpactedStateChange(wparam); 1252 trident_services->FirePrivacyImpactedStateChange(wparam);
1247 else 1253 else
1248 NOTREACHED() << "Failed to retrieve IWebBrowser2 interface."; 1254 NOTREACHED() << "Failed to retrieve IWebBrowser2 interface.";
1249 return 0; 1255 return 0;
1250 } 1256 }
OLDNEW
« no previous file with comments | « no previous file | chrome_frame/chrome_frame_activex_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698