| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 #include "chrome/browser/first_run.h" | 5 #include "chrome/browser/first_run.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include <shellapi.h> | 10 #include <shellapi.h> |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 // An approximate window size. After Layout() we'll get better bounds. | 677 // An approximate window size. After Layout() we'll get better bounds. |
| 678 gfx::Rect pos(310, 160); | 678 gfx::Rect pos(310, 160); |
| 679 views::WidgetWin* popup = new views::WidgetWin(); | 679 views::WidgetWin* popup = new views::WidgetWin(); |
| 680 if (!popup) { | 680 if (!popup) { |
| 681 NOTREACHED(); | 681 NOTREACHED(); |
| 682 return Upgrade::TD_DIALOG_ERROR; | 682 return Upgrade::TD_DIALOG_ERROR; |
| 683 } | 683 } |
| 684 popup->set_delete_on_destroy(true); | 684 popup->set_delete_on_destroy(true); |
| 685 popup->set_window_style(WS_POPUP | WS_CLIPCHILDREN); | 685 popup->set_window_style(WS_POPUP | WS_CLIPCHILDREN); |
| 686 popup->set_window_ex_style(WS_EX_TOOLWINDOW); | 686 popup->set_window_ex_style(WS_EX_TOOLWINDOW); |
| 687 popup->Init(NULL, pos, true); | 687 popup->Init(NULL, pos); |
| 688 | 688 |
| 689 views::RootView* root_view = popup->GetRootView(); | 689 views::RootView* root_view = popup->GetRootView(); |
| 690 // The window color is a tiny bit off-white. | 690 // The window color is a tiny bit off-white. |
| 691 root_view->set_background( | 691 root_view->set_background( |
| 692 views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc)); | 692 views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc)); |
| 693 | 693 |
| 694 views::GridLayout* layout = CreatePanelGridLayout(root_view); | 694 views::GridLayout* layout = CreatePanelGridLayout(root_view); |
| 695 if (!layout) { | 695 if (!layout) { |
| 696 NOTREACHED(); | 696 NOTREACHED(); |
| 697 return Upgrade::TD_DIALOG_ERROR; | 697 return Upgrade::TD_DIALOG_ERROR; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 | 866 |
| 867 DISALLOW_COPY_AND_ASSIGN(TryChromeDialog); | 867 DISALLOW_COPY_AND_ASSIGN(TryChromeDialog); |
| 868 }; | 868 }; |
| 869 | 869 |
| 870 } // namespace | 870 } // namespace |
| 871 | 871 |
| 872 Upgrade::TryResult Upgrade::ShowTryChromeDialog() { | 872 Upgrade::TryResult Upgrade::ShowTryChromeDialog() { |
| 873 TryChromeDialog td; | 873 TryChromeDialog td; |
| 874 return td.ShowModal(); | 874 return td.ShowModal(); |
| 875 } | 875 } |
| OLD | NEW |