OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/webui/chromeos/first_run/first_run_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_ui.h" |
6 | 6 |
7 #include "ash/shelf/wm_shelf.h" | 7 #include "ash/shelf/wm_shelf.h" |
8 #include "ash/wm_shell.h" | 8 #include "ash/shell_port.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_handler.h" | 13 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_handler.h" |
14 #include "chrome/common/url_constants.h" | 14 #include "chrome/common/url_constants.h" |
15 #include "chrome/grit/browser_resources.h" | 15 #include "chrome/grit/browser_resources.h" |
16 #include "chrome/grit/chromium_strings.h" | 16 #include "chrome/grit/chromium_strings.h" |
17 #include "chrome/grit/generated_resources.h" | 17 #include "chrome/grit/generated_resources.h" |
18 #include "chromeos/chromeos_switches.h" | 18 #include "chromeos/chromeos_switches.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 localized_strings->SetString( | 57 localized_strings->SetString( |
58 "helpFinishButton", | 58 "helpFinishButton", |
59 l10n_util::GetStringUTF16(IDS_FIRST_RUN_HELP_STEP_FINISH_BUTTON)); | 59 l10n_util::GetStringUTF16(IDS_FIRST_RUN_HELP_STEP_FINISH_BUTTON)); |
60 localized_strings->SetString( | 60 localized_strings->SetString( |
61 "nextButton", l10n_util::GetStringUTF16(IDS_FIRST_RUN_NEXT_BUTTON)); | 61 "nextButton", l10n_util::GetStringUTF16(IDS_FIRST_RUN_NEXT_BUTTON)); |
62 localized_strings->SetBoolean( | 62 localized_strings->SetBoolean( |
63 "transitionsEnabled", | 63 "transitionsEnabled", |
64 base::CommandLine::ForCurrentProcess()->HasSwitch( | 64 base::CommandLine::ForCurrentProcess()->HasSwitch( |
65 chromeos::switches::kEnableFirstRunUITransitions)); | 65 chromeos::switches::kEnableFirstRunUITransitions)); |
66 ash::WmShelf* shelf = | 66 ash::WmShelf* shelf = |
67 ash::WmShelf::ForWindow(ash::WmShell::Get()->GetPrimaryRootWindow()); | 67 ash::WmShelf::ForWindow(ash::ShellPort::Get()->GetPrimaryRootWindow()); |
68 std::string shelf_alignment; | 68 std::string shelf_alignment; |
69 switch (shelf->alignment()) { | 69 switch (shelf->alignment()) { |
70 case ash::SHELF_ALIGNMENT_BOTTOM: | 70 case ash::SHELF_ALIGNMENT_BOTTOM: |
71 case ash::SHELF_ALIGNMENT_BOTTOM_LOCKED: | 71 case ash::SHELF_ALIGNMENT_BOTTOM_LOCKED: |
72 shelf_alignment = kShelfAlignmentBottom; | 72 shelf_alignment = kShelfAlignmentBottom; |
73 break; | 73 break; |
74 case ash::SHELF_ALIGNMENT_LEFT: | 74 case ash::SHELF_ALIGNMENT_LEFT: |
75 shelf_alignment = kShelfAlignmentLeft; | 75 shelf_alignment = kShelfAlignmentLeft; |
76 break; | 76 break; |
77 case ash::SHELF_ALIGNMENT_RIGHT: | 77 case ash::SHELF_ALIGNMENT_RIGHT: |
(...skipping 25 matching lines...) Expand all Loading... |
103 : WebUIController(web_ui), | 103 : WebUIController(web_ui), |
104 actor_(NULL) { | 104 actor_(NULL) { |
105 auto handler = base::MakeUnique<FirstRunHandler>(); | 105 auto handler = base::MakeUnique<FirstRunHandler>(); |
106 actor_ = handler.get(); | 106 actor_ = handler.get(); |
107 web_ui->AddMessageHandler(std::move(handler)); | 107 web_ui->AddMessageHandler(std::move(handler)); |
108 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), CreateDataSource()); | 108 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), CreateDataSource()); |
109 } | 109 } |
110 | 110 |
111 } // namespace chromeos | 111 } // namespace chromeos |
112 | 112 |
OLD | NEW |