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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_ui.cc

Issue 572633003: Enable webview tag in webui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/common/extensions/api/_api_features.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 7 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sessions/session_tab_helper.h" 9 #include "chrome/browser/sessions/session_tab_helper.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
11 #include "chrome/grit/chromium_strings.h" 11 #include "chrome/grit/chromium_strings.h"
12 #include "content/public/browser/render_frame_host.h" 12 #include "content/public/browser/render_frame_host.h"
13 #include "content/public/browser/web_ui.h" 13 #include "content/public/browser/web_ui.h"
14 #include "content/public/browser/web_ui_data_source.h" 14 #include "content/public/browser/web_ui_data_source.h"
15 #include "grit/browser_resources.h" 15 #include "grit/browser_resources.h"
16 #if defined(OS_CHROMEOS) 16 #if defined(OS_CHROMEOS)
17 #include "chrome/browser/ui/webui/chromeos/login/inline_login_handler_chromeos.h " 17 #include "chrome/browser/ui/webui/chromeos/login/inline_login_handler_chromeos.h "
18 #else 18 #else
19 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h" 19 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h"
20 #endif 20 #endif
21 21
22 namespace { 22 namespace {
23 23
24 content::WebUIDataSource* CreateWebUIDataSource() { 24 content::WebUIDataSource* CreateWebUIDataSource() {
25 content::WebUIDataSource* source = 25 content::WebUIDataSource* source =
26 content::WebUIDataSource::Create(chrome::kChromeUIChromeSigninHost); 26 content::WebUIDataSource::Create(chrome::kChromeUIChromeSigninHost);
27 source->OverrideContentSecurityPolicyFrameSrc("frame-src chrome-extension:;"); 27 source->OverrideContentSecurityPolicyFrameSrc("frame-src chrome-extension:;");
28 source->OverrideContentSecurityPolicyObjectSrc("object-src *;");
28 source->SetUseJsonJSFormatV2(); 29 source->SetUseJsonJSFormatV2();
29 source->SetJsonPath("strings.js"); 30 source->SetJsonPath("strings.js");
30 31
31 source->SetDefaultResource(IDR_INLINE_LOGIN_HTML); 32 source->SetDefaultResource(IDR_INLINE_LOGIN_HTML);
32 source->AddResourcePath("inline_login.css", IDR_INLINE_LOGIN_CSS); 33 source->AddResourcePath("inline_login.css", IDR_INLINE_LOGIN_CSS);
33 source->AddResourcePath("inline_login.js", IDR_INLINE_LOGIN_JS); 34 source->AddResourcePath("inline_login.js", IDR_INLINE_LOGIN_JS);
34 35
35 source->AddLocalizedString("title", IDS_CHROME_SIGNIN_TITLE); 36 source->AddLocalizedString("title", IDS_CHROME_SIGNIN_TITLE);
36 return source; 37 return source;
37 } 38 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 std::set<content::RenderFrameHost*> frame_set; 84 std::set<content::RenderFrameHost*> frame_set;
84 web_contents->ForEachFrame( 85 web_contents->ForEachFrame(
85 base::Bind(&AddToSetIfIsAuthIframe, &frame_set, 86 base::Bind(&AddToSetIfIsAuthIframe, &frame_set,
86 parent_origin, parent_frame_name)); 87 parent_origin, parent_frame_name));
87 DCHECK_GE(1U, frame_set.size()); 88 DCHECK_GE(1U, frame_set.size());
88 if (!frame_set.empty()) 89 if (!frame_set.empty())
89 return *frame_set.begin(); 90 return *frame_set.begin();
90 91
91 return NULL; 92 return NULL;
92 } 93 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/api/_api_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698