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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.h

Issue 336583002: Disable context menu for constrained inline signin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/signin/inline_login_handler_impl.cc » ('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 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" 12 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
13 #include "chrome/browser/ui/webui/signin/inline_login_handler.h" 13 #include "chrome/browser/ui/webui/signin/inline_login_handler.h"
14 #include "content/public/browser/web_contents_delegate.h"
14 15
15 class GaiaAuthFetcher; 16 class GaiaAuthFetcher;
16 17
17 // Implementation for the inline login WebUI handler on desktop Chrome. Once 18 // Implementation for the inline login WebUI handler on desktop Chrome. Once
18 // CrOS migrates to the same webview approach as desktop Chrome, much of the 19 // CrOS migrates to the same webview approach as desktop Chrome, much of the
19 // code in this class should move to its base class |InlineLoginHandler|. 20 // code in this class should move to its base class |InlineLoginHandler|.
20 class InlineLoginHandlerImpl : public InlineLoginHandler { 21 class InlineLoginHandlerImpl : public InlineLoginHandler,
22 public content::WebContentsDelegate {
21 public: 23 public:
22 InlineLoginHandlerImpl(); 24 InlineLoginHandlerImpl();
23 virtual ~InlineLoginHandlerImpl(); 25 virtual ~InlineLoginHandlerImpl();
24 26
25 using InlineLoginHandler::web_ui; 27 using InlineLoginHandler::web_ui;
26 28
27 base::WeakPtr<InlineLoginHandlerImpl> GetWeakPtr() { 29 base::WeakPtr<InlineLoginHandlerImpl> GetWeakPtr() {
28 return weak_factory_.GetWeakPtr(); 30 return weak_factory_.GetWeakPtr();
29 } 31 }
30 32
31 Browser* GetDesktopBrowser(); 33 Browser* GetDesktopBrowser();
32 void SyncStarterCallback(OneClickSigninSyncStarter::SyncSetupResult result); 34 void SyncStarterCallback(OneClickSigninSyncStarter::SyncSetupResult result);
33 void CloseTab(); 35 void CloseTab();
34 void HandleLoginError(const std::string& error_msg); 36 void HandleLoginError(const std::string& error_msg);
35 37
36 private: 38 private:
37 // InlineLoginHandler overrides: 39 // InlineLoginHandler overrides:
38 virtual void SetExtraInitParams(base::DictionaryValue& params) OVERRIDE; 40 virtual void SetExtraInitParams(base::DictionaryValue& params) OVERRIDE;
39 virtual void CompleteLogin(const base::ListValue* args) OVERRIDE; 41 virtual void CompleteLogin(const base::ListValue* args) OVERRIDE;
40 42
43 // Overridden from content::WebContentsDelegate.
44 virtual bool HandleContextMenu(
xiyuan 2014/06/12 18:02:04 Move this to InlineLoginHandler to fix ChromeOS di
guohui 2014/06/12 20:15:30 Done.
45 const content::ContextMenuParams& params) OVERRIDE;
46
41 base::WeakPtrFactory<InlineLoginHandlerImpl> weak_factory_; 47 base::WeakPtrFactory<InlineLoginHandlerImpl> weak_factory_;
42 std::string email_; 48 std::string email_;
43 std::string password_; 49 std::string password_;
44 std::string session_index_; 50 std::string session_index_;
45 bool choose_what_to_sync_; 51 bool choose_what_to_sync_;
46 52
47 DISALLOW_COPY_AND_ASSIGN(InlineLoginHandlerImpl); 53 DISALLOW_COPY_AND_ASSIGN(InlineLoginHandlerImpl);
48 }; 54 };
49 55
50 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ 56 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/signin/inline_login_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698