Chromium Code Reviews| Index: chrome/browser/chromeos/arc/arc_support_host.cc |
| diff --git a/chrome/browser/chromeos/arc/arc_support_host.cc b/chrome/browser/chromeos/arc/arc_support_host.cc |
| index 3941d5d756972a5d970c68fec2cc95d10f7507dd..ec36076be4b05d7adb5daf7f1d5c8c87c12dc4f4 100644 |
| --- a/chrome/browser/chromeos/arc/arc_support_host.cc |
| +++ b/chrome/browser/chromeos/arc/arc_support_host.cc |
| @@ -219,7 +219,12 @@ void ArcSupportHost::ShowPage(UIPage ui_page) { |
| << "establishing."; |
| return; |
| } |
| - RequestAppStart(); |
| + |
| + if (!silent_mode_ || ui_page != UIPage::ARC_LOADING) |
| + RequestAppStart(); |
| + else |
| + VLOG(2) << "Skip showing Arc loading progess due in silent mode."; |
| + |
| return; |
| } |
| @@ -381,7 +386,7 @@ void ArcSupportHost::DisconnectMessageHost() { |
| void ArcSupportHost::RequestAppStart() { |
| DCHECK(!message_host_); |
| DCHECK(!app_start_pending_); |
| - |
| + silent_mode_ = false; |
| app_start_pending_ = true; |
| request_open_app_callback_.Run(profile_); |
| } |
| @@ -491,6 +496,17 @@ bool ArcSupportHost::Initialize() { |
| return true; |
| } |
| +void ArcSupportHost::SetSilentMode() { |
| + if (message_host_) { |
| + // In case of managed Arc, UI is started OnPrimaryProfilePrepared which |
|
xiyuan
2016/12/08 20:27:28
nit: OnPrimaryProfilePrepared -> OnPrimary*User*Pr
khmel
2016/12/08 23:33:45
Done.
|
| + // happens earlier than user processes Arc OOBE page. Close UI manually in |
| + // this case. |
| + DCHECK(ui_page_ == UIPage::ARC_LOADING || ui_page_ == UIPage::TERMS); |
| + Close(); |
|
xiyuan
2016/12/08 20:27:28
Is it possible to not open the UI at all instead o
khmel
2016/12/08 23:33:45
Yes, not opening is preferred. However found yet a
|
| + } |
| + silent_mode_ = true; |
| +} |
| + |
| void ArcSupportHost::OnDisplayAdded(const display::Display& new_display) {} |
| void ArcSupportHost::OnDisplayRemoved(const display::Display& old_display) {} |