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/signin/inline_login_ui.h" | 5 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 content::WebContents* web_contents, | 131 content::WebContents* web_contents, |
132 const GURL& parent_origin, | 132 const GURL& parent_origin, |
133 const std::string& parent_frame_name) { | 133 const std::string& parent_frame_name) { |
134 std::set<content::RenderFrameHost*> frame_set; | 134 std::set<content::RenderFrameHost*> frame_set; |
135 bool is_webview = switches::IsEnableWebviewBasedSignin(); | 135 bool is_webview = switches::IsEnableWebviewBasedSignin(); |
136 #if defined(OS_CHROMEOS) | 136 #if defined(OS_CHROMEOS) |
137 is_webview = is_webview || chromeos::StartupUtils::IsWebviewSigninEnabled(); | 137 is_webview = is_webview || chromeos::StartupUtils::IsWebviewSigninEnabled(); |
138 #endif | 138 #endif |
139 if (is_webview) { | 139 if (is_webview) { |
140 extensions::GuestViewManager* manager = | 140 extensions::GuestViewManager* manager = |
141 extensions::GuestViewManager::FromBrowserContextIfAvailable( | 141 extensions::GuestViewManager::FromBrowserContext( |
142 web_contents->GetBrowserContext()); | 142 web_contents->GetBrowserContext()); |
143 if (manager) { | 143 if (manager) { |
144 manager->ForEachGuest(web_contents, | 144 manager->ForEachGuest(web_contents, |
145 base::Bind(&AddToSetIfSigninWebview, &frame_set)); | 145 base::Bind(&AddToSetIfSigninWebview, &frame_set)); |
146 } | 146 } |
147 } else { | 147 } else { |
148 web_contents->ForEachFrame( | 148 web_contents->ForEachFrame( |
149 base::Bind(&AddToSetIfIsAuthIframe, &frame_set, | 149 base::Bind(&AddToSetIfIsAuthIframe, &frame_set, |
150 parent_origin, parent_frame_name)); | 150 parent_origin, parent_frame_name)); |
151 } | 151 } |
152 DCHECK_GE(1U, frame_set.size()); | 152 DCHECK_GE(1U, frame_set.size()); |
153 if (!frame_set.empty()) | 153 if (!frame_set.empty()) |
154 return *frame_set.begin(); | 154 return *frame_set.begin(); |
155 | 155 |
156 return NULL; | 156 return NULL; |
157 } | 157 } |
OLD | NEW |