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

Unified Diff: chrome/browser/ui/webui/signin/get_auth_frame.cc

Issue 2275883003: [Signin Error Dialog] (2/3) Added handlers and UI constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@error-modal-web
Patch Set: Final nit from tommycli Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/signin/get_auth_frame.cc
diff --git a/chrome/browser/ui/webui/signin/get_auth_frame.cc b/chrome/browser/ui/webui/signin/get_auth_frame.cc
deleted file mode 100644
index f5705a299978da8b6e019b339a5c9d7edd28903a..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/signin/get_auth_frame.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/webui/signin/get_auth_frame.h"
-
-#include <set>
-
-#include "base/bind.h"
-#include "components/guest_view/browser/guest_view_manager.h"
-#include "content/public/browser/web_contents.h"
-#include "extensions/browser/guest_view/web_view/web_view_guest.h"
-
-namespace {
-
-bool AddWebContentsToSet(std::set<content::WebContents*>* frame_set,
- const std::string& web_view_name,
- content::WebContents* web_contents) {
- auto* web_view = extensions::WebViewGuest::FromWebContents(web_contents);
- if (web_view && web_view->name() == web_view_name)
- frame_set->insert(web_contents);
- return false;
-}
-
-} // namespace
-
-namespace signin {
-
-content::RenderFrameHost* GetAuthFrame(content::WebContents* web_contents,
- const std::string& parent_frame_name) {
- content::WebContents* auth_web_contents =
- GetAuthFrameWebContents(web_contents, parent_frame_name);
- return auth_web_contents ? auth_web_contents->GetMainFrame() : nullptr;
-}
-
-content::WebContents* GetAuthFrameWebContents(
- content::WebContents* web_contents,
- const std::string& parent_frame_name) {
- std::set<content::WebContents*> frame_set;
- auto* manager = guest_view::GuestViewManager::FromBrowserContext(
- web_contents->GetBrowserContext());
- if (manager) {
- manager->ForEachGuest(
- web_contents,
- base::Bind(&AddWebContentsToSet, &frame_set, parent_frame_name));
- }
- DCHECK_GE(1U, frame_set.size());
- if (!frame_set.empty())
- return *frame_set.begin();
-
- return nullptr;
-}
-
-} // namespace signin
« no previous file with comments | « chrome/browser/ui/webui/signin/get_auth_frame.h ('k') | chrome/browser/ui/webui/signin/inline_login_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698