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

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

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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
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->OverrideContentSecurityPolicyObjectSrc("object-src *;");
29 source->SetUseJsonJSFormatV2();
30 source->SetJsonPath("strings.js"); 29 source->SetJsonPath("strings.js");
31 30
32 source->SetDefaultResource(IDR_INLINE_LOGIN_HTML); 31 source->SetDefaultResource(IDR_INLINE_LOGIN_HTML);
33 source->AddResourcePath("inline_login.css", IDR_INLINE_LOGIN_CSS); 32 source->AddResourcePath("inline_login.css", IDR_INLINE_LOGIN_CSS);
34 source->AddResourcePath("inline_login.js", IDR_INLINE_LOGIN_JS); 33 source->AddResourcePath("inline_login.js", IDR_INLINE_LOGIN_JS);
35 34
36 source->AddLocalizedString("title", IDS_CHROME_SIGNIN_TITLE); 35 source->AddLocalizedString("title", IDS_CHROME_SIGNIN_TITLE);
37 return source; 36 return source;
38 } 37 }
39 38
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 std::set<content::RenderFrameHost*> frame_set; 83 std::set<content::RenderFrameHost*> frame_set;
85 web_contents->ForEachFrame( 84 web_contents->ForEachFrame(
86 base::Bind(&AddToSetIfIsAuthIframe, &frame_set, 85 base::Bind(&AddToSetIfIsAuthIframe, &frame_set,
87 parent_origin, parent_frame_name)); 86 parent_origin, parent_frame_name));
88 DCHECK_GE(1U, frame_set.size()); 87 DCHECK_GE(1U, frame_set.size());
89 if (!frame_set.empty()) 88 if (!frame_set.empty())
90 return *frame_set.begin(); 89 return *frame_set.begin();
91 90
92 return NULL; 91 return NULL;
93 } 92 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/set_as_default_browser_ui.cc ('k') | chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698