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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 2721153004: Remove ash_util namespace (Closed)
Patch Set: Created 3 years, 9 months 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
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/ui/webui/chromeos/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 content::URLDataSource::Add(profile, user_image_source); 377 content::URLDataSource::Add(profile, user_image_source);
378 378
379 // TabHelper is required for OOBE webui to make webview working on it. 379 // TabHelper is required for OOBE webui to make webview working on it.
380 content::WebContents* contents = web_ui->GetWebContents(); 380 content::WebContents* contents = web_ui->GetWebContents();
381 extensions::TabHelper::CreateForWebContents(contents); 381 extensions::TabHelper::CreateForWebContents(contents);
382 } 382 }
383 383
384 OobeUI::~OobeUI() { 384 OobeUI::~OobeUI() {
385 core_handler_->SetDelegate(nullptr); 385 core_handler_->SetDelegate(nullptr);
386 network_dropdown_handler_->RemoveObserver(error_screen_handler_); 386 network_dropdown_handler_->RemoveObserver(error_screen_handler_);
387 if (ash_util::IsRunningInMash()) { 387 if (IsRunningInMash()) {
388 // TODO: Ash needs to expose screen dimming api. See 388 // TODO: Ash needs to expose screen dimming api. See
389 // http://crbug.com/646034. 389 // http://crbug.com/646034.
390 NOTIMPLEMENTED(); 390 NOTIMPLEMENTED();
391 } 391 }
392 } 392 }
393 393
394 CoreOobeView* OobeUI::GetCoreOobeView() { 394 CoreOobeView* OobeUI::GetCoreOobeView() {
395 return core_handler_; 395 return core_handler_;
396 } 396 }
397 397
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 observer_list_.RemoveObserver(observer); 607 observer_list_.RemoveObserver(observer);
608 } 608 }
609 609
610 void OobeUI::OnCurrentScreenChanged(OobeScreen new_screen) { 610 void OobeUI::OnCurrentScreenChanged(OobeScreen new_screen) {
611 previous_screen_ = current_screen_; 611 previous_screen_ = current_screen_;
612 612
613 const bool should_dim = 613 const bool should_dim =
614 std::find(std::begin(kDimOverlayScreenIds), 614 std::find(std::begin(kDimOverlayScreenIds),
615 std::end(kDimOverlayScreenIds), 615 std::end(kDimOverlayScreenIds),
616 new_screen) != std::end(kDimOverlayScreenIds); 616 new_screen) != std::end(kDimOverlayScreenIds);
617 if (!ash_util::IsRunningInMash()) { 617 if (!IsRunningInMash()) {
618 if (!screen_dimmer_) { 618 if (!screen_dimmer_) {
619 screen_dimmer_ = base::MakeUnique<ash::ScreenDimmer>( 619 screen_dimmer_ = base::MakeUnique<ash::ScreenDimmer>(
620 ash::ScreenDimmer::Container::LOCK_SCREEN); 620 ash::ScreenDimmer::Container::LOCK_SCREEN);
621 } 621 }
622 screen_dimmer_->set_at_bottom(true); 622 screen_dimmer_->set_at_bottom(true);
623 screen_dimmer_->SetDimming(should_dim); 623 screen_dimmer_->SetDimming(should_dim);
624 } else { 624 } else {
625 // TODO: Ash needs to expose screen dimming api. See 625 // TODO: Ash needs to expose screen dimming api. See
626 // http://crbug.com/646034. 626 // http://crbug.com/646034.
627 NOTIMPLEMENTED(); 627 NOTIMPLEMENTED();
628 } 628 }
629 629
630 current_screen_ = new_screen; 630 current_screen_ = new_screen;
631 for (Observer& observer : observer_list_) 631 for (Observer& observer : observer_list_)
632 observer.OnCurrentScreenChanged(current_screen_, new_screen); 632 observer.OnCurrentScreenChanged(current_screen_, new_screen);
633 } 633 }
634 634
635 void OobeUI::UpdateLocalizedStringsIfNeeded() { 635 void OobeUI::UpdateLocalizedStringsIfNeeded() {
636 if (oobe_ui_md_mode_ == 636 if (oobe_ui_md_mode_ ==
637 g_browser_process->local_state()->GetBoolean(prefs::kOobeMdMode)) { 637 g_browser_process->local_state()->GetBoolean(prefs::kOobeMdMode)) {
638 return; 638 return;
639 } 639 }
640 640
641 base::DictionaryValue localized_strings; 641 base::DictionaryValue localized_strings;
642 GetLocalizedStrings(&localized_strings); 642 GetLocalizedStrings(&localized_strings);
643 static_cast<CoreOobeView*>(core_handler_)->ReloadContent(localized_strings); 643 static_cast<CoreOobeView*>(core_handler_)->ReloadContent(localized_strings);
644 } 644 }
645 645
646 } // namespace chromeos 646 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698