| 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/shell_port.h" | 8 #include "ash/shell.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 localized_strings->SetString( | 66 localized_strings->SetString( |
| 67 "accessibleTitle", | 67 "accessibleTitle", |
| 68 l10n_util::GetStringUTF16(IDS_FIRST_RUN_STEP_ACCESSIBLE_TITLE)); | 68 l10n_util::GetStringUTF16(IDS_FIRST_RUN_STEP_ACCESSIBLE_TITLE)); |
| 69 ash::WmShelf* shelf = | 69 ash::WmShelf* shelf = |
| 70 ash::WmShelf::ForWindow(ash::ShellPort::Get()->GetPrimaryRootWindow()); | 70 ash::WmShelf::ForWindow(ash::Shell::GetPrimaryRootWindow()); |
| 71 std::string shelf_alignment; | 71 std::string shelf_alignment; |
| 72 switch (shelf->alignment()) { | 72 switch (shelf->alignment()) { |
| 73 case ash::SHELF_ALIGNMENT_BOTTOM: | 73 case ash::SHELF_ALIGNMENT_BOTTOM: |
| 74 case ash::SHELF_ALIGNMENT_BOTTOM_LOCKED: | 74 case ash::SHELF_ALIGNMENT_BOTTOM_LOCKED: |
| 75 shelf_alignment = kShelfAlignmentBottom; | 75 shelf_alignment = kShelfAlignmentBottom; |
| 76 break; | 76 break; |
| 77 case ash::SHELF_ALIGNMENT_LEFT: | 77 case ash::SHELF_ALIGNMENT_LEFT: |
| 78 shelf_alignment = kShelfAlignmentLeft; | 78 shelf_alignment = kShelfAlignmentLeft; |
| 79 break; | 79 break; |
| 80 case ash::SHELF_ALIGNMENT_RIGHT: | 80 case ash::SHELF_ALIGNMENT_RIGHT: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 105 FirstRunUI::FirstRunUI(content::WebUI* web_ui) | 105 FirstRunUI::FirstRunUI(content::WebUI* web_ui) |
| 106 : WebUIController(web_ui), | 106 : WebUIController(web_ui), |
| 107 actor_(NULL) { | 107 actor_(NULL) { |
| 108 auto handler = base::MakeUnique<FirstRunHandler>(); | 108 auto handler = base::MakeUnique<FirstRunHandler>(); |
| 109 actor_ = handler.get(); | 109 actor_ = handler.get(); |
| 110 web_ui->AddMessageHandler(std::move(handler)); | 110 web_ui->AddMessageHandler(std::move(handler)); |
| 111 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), CreateDataSource()); | 111 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), CreateDataSource()); |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace chromeos | 114 } // namespace chromeos |
| OLD | NEW |