| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/signin/signin_utils.h" | 5 #include "chrome/browser/ui/webui/signin/signin_utils.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/ui/browser_finder.h" | 12 #include "chrome/browser/ui/browser_finder.h" |
| 13 #include "chrome/common/pref_names.h" |
| 12 #include "components/guest_view/browser/guest_view_manager.h" | 14 #include "components/guest_view/browser/guest_view_manager.h" |
| 15 #include "components/prefs/pref_service.h" |
| 13 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
| 14 #include "content/public/browser/web_ui.h" | 17 #include "content/public/browser/web_ui.h" |
| 15 #include "extensions/browser/guest_view/web_view/web_view_guest.h" | 18 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
| 16 | 19 |
| 17 namespace { | 20 namespace { |
| 18 | 21 |
| 19 bool AddWebContentsToSet(std::set<content::WebContents*>* frame_set, | 22 bool AddWebContentsToSet(std::set<content::WebContents*>* frame_set, |
| 20 const std::string& web_view_name, | 23 const std::string& web_view_name, |
| 21 content::WebContents* web_contents) { | 24 content::WebContents* web_contents) { |
| 22 auto* web_view = extensions::WebViewGuest::FromWebContents(web_contents); | 25 auto* web_view = extensions::WebViewGuest::FromWebContents(web_contents); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 const bool success = args->GetDouble(0, &height); | 71 const bool success = args->GetDouble(0, &height); |
| 69 DCHECK(success); | 72 DCHECK(success); |
| 70 | 73 |
| 71 Browser* browser = GetDesktopBrowser(web_ui); | 74 Browser* browser = GetDesktopBrowser(web_ui); |
| 72 if (browser) { | 75 if (browser) { |
| 73 browser->signin_view_controller()->SetModalSigninHeight( | 76 browser->signin_view_controller()->SetModalSigninHeight( |
| 74 static_cast<int>(height)); | 77 static_cast<int>(height)); |
| 75 } | 78 } |
| 76 } | 79 } |
| 77 | 80 |
| 81 bool IsForceSigninEnabled() { |
| 82 PrefService* prefs = g_browser_process->local_state(); |
| 83 return prefs->GetBoolean(prefs::kForceBrowserSignin); |
| 84 } |
| 85 |
| 78 } // namespace signin | 86 } // namespace signin |
| OLD | NEW |