OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/first_run.h" | 5 #include "chrome/browser/first_run/first_run.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 | 10 |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 popup->set_delete_on_destroy(true); | 636 popup->set_delete_on_destroy(true); |
637 popup->set_window_style(WS_POPUP | WS_CLIPCHILDREN); | 637 popup->set_window_style(WS_POPUP | WS_CLIPCHILDREN); |
638 popup->set_window_ex_style(WS_EX_TOOLWINDOW); | 638 popup->set_window_ex_style(WS_EX_TOOLWINDOW); |
639 popup->Init(NULL, pos); | 639 popup->Init(NULL, pos); |
640 | 640 |
641 views::RootView* root_view = popup->GetRootView(); | 641 views::RootView* root_view = popup->GetRootView(); |
642 // The window color is a tiny bit off-white. | 642 // The window color is a tiny bit off-white. |
643 root_view->set_background( | 643 root_view->set_background( |
644 views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc)); | 644 views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc)); |
645 | 645 |
646 views::GridLayout* layout = CreatePanelGridLayout(root_view); | 646 views::GridLayout* layout = views::GridLayout::CreatePanel(root_view); |
647 if (!layout) { | 647 if (!layout) { |
648 NOTREACHED(); | 648 NOTREACHED(); |
649 return Upgrade::TD_DIALOG_ERROR; | 649 return Upgrade::TD_DIALOG_ERROR; |
650 } | 650 } |
651 root_view->SetLayoutManager(layout); | 651 root_view->SetLayoutManager(layout); |
652 | 652 |
653 views::ColumnSet* columns; | 653 views::ColumnSet* columns; |
654 // First row: [icon][pad][text][button]. | 654 // First row: [icon][pad][text][button]. |
655 columns = layout->AddColumnSet(0); | 655 columns = layout->AddColumnSet(0); |
656 columns->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0, | 656 columns->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0, |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 | 857 |
858 Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) { | 858 Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) { |
859 if (version > 10000) { | 859 if (version > 10000) { |
860 // This is a test value. We want to make sure we exercise | 860 // This is a test value. We want to make sure we exercise |
861 // returning this early. See EarlyReturnTest test harness. | 861 // returning this early. See EarlyReturnTest test harness. |
862 return Upgrade::TD_NOT_NOW; | 862 return Upgrade::TD_NOT_NOW; |
863 } | 863 } |
864 TryChromeDialog td(version); | 864 TryChromeDialog td(version); |
865 return td.ShowModal(); | 865 return td.ShowModal(); |
866 } | 866 } |
OLD | NEW |