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

Side by Side Diff: views/widget/widget_win.cc

Issue 200045: Use Scoped[Bstr,ComPtr,Variant] instead of their ATL equivalents to reduce de... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "views/widget/widget_win.h" 5 #include "views/widget/widget_win.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/gfx/path.h" 8 #include "app/gfx/path.h"
9 #include "app/l10n_util_win.h" 9 #include "app/l10n_util_win.h"
10 #include "app/win_util.h" 10 #include "app/win_util.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 CComObject<ViewAccessibility>* instance = NULL; 463 CComObject<ViewAccessibility>* instance = NULL;
464 464
465 HRESULT hr = CComObject<ViewAccessibility>::CreateInstance(&instance); 465 HRESULT hr = CComObject<ViewAccessibility>::CreateInstance(&instance);
466 DCHECK(SUCCEEDED(hr)); 466 DCHECK(SUCCEEDED(hr));
467 467
468 if (!instance) { 468 if (!instance) {
469 // Return with failure. 469 // Return with failure.
470 return static_cast<LRESULT>(0L); 470 return static_cast<LRESULT>(0L);
471 } 471 }
472 472
473 CComPtr<IAccessible> accessibility_instance(instance); 473 ScopedComPtr<IAccessible> accessibility_instance(instance);
474 474
475 if (!SUCCEEDED(instance->Initialize(root_view_.get()))) { 475 if (!SUCCEEDED(instance->Initialize(root_view_.get()))) {
476 // Return with failure. 476 // Return with failure.
477 return static_cast<LRESULT>(0L); 477 return static_cast<LRESULT>(0L);
478 } 478 }
479 479
480 // All is well, assign the temp instance to the class smart pointer 480 // All is well, assign the temp instance to the class smart pointer
481 accessibility_root_.Attach(accessibility_instance.Detach()); 481 accessibility_root_.Attach(accessibility_instance.Detach());
482 482
483 if (!accessibility_root_) { 483 if (!accessibility_root_) {
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 WidgetWin* popup = new WidgetWin; 953 WidgetWin* popup = new WidgetWin;
954 popup->set_window_style(WS_POPUP); 954 popup->set_window_style(WS_POPUP);
955 popup->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW | 955 popup->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW |
956 WS_EX_TRANSPARENT | 956 WS_EX_TRANSPARENT |
957 l10n_util::GetExtendedTooltipStyles()); 957 l10n_util::GetExtendedTooltipStyles());
958 popup->set_delete_on_destroy(delete_on_destroy); 958 popup->set_delete_on_destroy(delete_on_destroy);
959 return popup; 959 return popup;
960 } 960 }
961 961
962 } // namespace views 962 } // namespace views
OLDNEW
« chrome/browser/history/history_publisher_win.cc ('K') | « views/widget/widget_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698