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

Side by Side Diff: chrome/browser/first_run/try_chrome_dialog_view.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/first_run/try_chrome_dialog_view.h" 5 #include "chrome/browser/first_run/try_chrome_dialog_view.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 separator->SetSize(gfx::Size(preferred.width(), separator_height)); 276 separator->SetSize(gfx::Size(preferred.width(), separator_height));
277 } 277 }
278 278
279 gfx::Rect pos = ComputeWindowPosition(preferred.width(), preferred.height(), 279 gfx::Rect pos = ComputeWindowPosition(preferred.width(), preferred.height(),
280 base::i18n::IsRTL()); 280 base::i18n::IsRTL());
281 popup_->SetBounds(pos); 281 popup_->SetBounds(pos);
282 282
283 // Carve the toast shape into the window. 283 // Carve the toast shape into the window.
284 HWND toast_window; 284 HWND toast_window;
285 #if defined(USE_AURA) 285 #if defined(USE_AURA)
286 toast_window = 286 toast_window = popup_->GetNativeView()->GetHost()->GetAcceleratedWidget();
287 popup_->GetNativeView()->GetDispatcher()->host()->GetAcceleratedWidget();
288 #else 287 #else
289 toast_window = popup_->GetNativeView(); 288 toast_window = popup_->GetNativeView();
290 #endif 289 #endif
291 SetToastRegion(toast_window, preferred.width(), preferred.height()); 290 SetToastRegion(toast_window, preferred.width(), preferred.height());
292 291
293 // Time to show the window in a modal loop. 292 // Time to show the window in a modal loop.
294 popup_->Show(); 293 popup_->Show();
295 if (!listener.is_null()) 294 if (!listener.is_null())
296 listener.Run(popup_->GetNativeView()); 295 listener.Run(popup_->GetNativeView());
297 base::MessageLoop::current()->Run(); 296 base::MessageLoop::current()->Run();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 result_ = TRY_CHROME_AS_DEFAULT; 365 result_ = TRY_CHROME_AS_DEFAULT;
367 } 366 }
368 367
369 popup_->Close(); 368 popup_->Close();
370 base::MessageLoop::current()->Quit(); 369 base::MessageLoop::current()->Quit();
371 } 370 }
372 371
373 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { 372 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) {
374 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); 373 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW);
375 } 374 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tabs_apitest.cc ('k') | chrome/browser/password_manager/password_manager_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698