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

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

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 | « ash/wm/boot_splash_screen_chromeos.cc ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('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) 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 } 276 }
277 277
278 gfx::Rect pos = ComputeWindowPosition(preferred.width(), preferred.height(), 278 gfx::Rect pos = ComputeWindowPosition(preferred.width(), preferred.height(),
279 base::i18n::IsRTL()); 279 base::i18n::IsRTL());
280 popup_->SetBounds(pos); 280 popup_->SetBounds(pos);
281 281
282 // Carve the toast shape into the window. 282 // Carve the toast shape into the window.
283 HWND toast_window; 283 HWND toast_window;
284 #if defined(USE_AURA) 284 #if defined(USE_AURA)
285 toast_window = 285 toast_window =
286 popup_->GetNativeView()->GetDispatcher()->GetAcceleratedWidget(); 286 popup_->GetNativeView()->GetDispatcher()->host()->GetAcceleratedWidget();
287 #else 287 #else
288 toast_window = popup_->GetNativeView(); 288 toast_window = popup_->GetNativeView();
289 #endif 289 #endif
290 SetToastRegion(toast_window, preferred.width(), preferred.height()); 290 SetToastRegion(toast_window, preferred.width(), preferred.height());
291 291
292 // Time to show the window in a modal loop. 292 // Time to show the window in a modal loop.
293 popup_->Show(); 293 popup_->Show();
294 if (!listener.is_null()) 294 if (!listener.is_null())
295 listener.Run(popup_->GetNativeView()); 295 listener.Run(popup_->GetNativeView());
296 base::MessageLoop::current()->Run(); 296 base::MessageLoop::current()->Run();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 result_ = TRY_CHROME_AS_DEFAULT; 365 result_ = TRY_CHROME_AS_DEFAULT;
366 } 366 }
367 367
368 popup_->Close(); 368 popup_->Close();
369 base::MessageLoop::current()->Quit(); 369 base::MessageLoop::current()->Quit();
370 } 370 }
371 371
372 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { 372 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) {
373 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); 373 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW);
374 } 374 }
OLDNEW
« no previous file with comments | « ash/wm/boot_splash_screen_chromeos.cc ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698