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

Side by Side Diff: chrome/renderer/one_click_signin_agent.cc

Issue 12086069: Enable Chrome Signin from Webstore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/renderer/one_click_signin_agent.h"
6
7 #include "chrome/common/one_click_signin_messages.h"
8 #include "content/public/common/password_form.h"
9 #include "content/public/renderer/document_state.h"
10 #include "content/public/renderer/render_view.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
13
14 OneClickSigninAgent::OneClickSigninAgent(
15 content::RenderView* render_view)
16 : content::RenderViewObserver(render_view) {
17 }
18
19 OneClickSigninAgent::~OneClickSigninAgent() {}
20
21 void OneClickSigninAgent::WillSubmitForm(WebKit::WebFrame* frame,
22 const WebKit::WebFormElement& form) {
23 content::DocumentState* document_state =
24 content::DocumentState::FromDataSource(frame->provisionalDataSource());
25 if (document_state->password_form_data()) {
26 Send(new OneClickSigninHostMsg_FormSubmitted(routing_id(),
27 *(document_state->password_form_data())));
28 }
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698