OLD | NEW |
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_SIGNIN_PRINCIPALS_MESSAGE_FILTER_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_PRINCIPALS_MESSAGE_FILTER_H_ |
6 #define CHROME_BROWSER_SIGNIN_PRINCIPALS_MESSAGE_FILTER_H_ | 6 #define CHROME_BROWSER_SIGNIN_PRINCIPALS_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include "content/public/browser/browser_message_filter.h" | 8 #include "content/public/browser/browser_message_filter.h" |
9 | 9 |
10 class GURL; | 10 class GURL; |
11 class Profile; | 11 class Profile; |
12 | 12 |
13 // A message filter implementation that receives messages for browser account | 13 // A message filter implementation that receives messages for browser account |
14 // management from the renderer. | 14 // management from the renderer. |
15 class PrincipalsMessageFilter : public content::BrowserMessageFilter { | 15 class PrincipalsMessageFilter : public content::BrowserMessageFilter { |
16 public: | 16 public: |
17 explicit PrincipalsMessageFilter(int render_process_id); | 17 explicit PrincipalsMessageFilter(int render_process_id); |
18 | 18 |
19 // content::BrowserMessageFilter implementation. | 19 // content::BrowserMessageFilter implementation. |
20 virtual void OverrideThreadForMessage( | 20 virtual void OverrideThreadForMessage( |
21 const IPC::Message& message, | 21 const IPC::Message& message, |
22 content::BrowserThread::ID* thread) OVERRIDE; | 22 content::BrowserThread::ID* thread) OVERRIDE; |
23 virtual bool OnMessageReceived(const IPC::Message& message, | 23 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
24 bool* message_was_ok) OVERRIDE; | |
25 | 24 |
26 private: | 25 private: |
27 virtual ~PrincipalsMessageFilter(); | 26 virtual ~PrincipalsMessageFilter(); |
28 | 27 |
29 void OnMsgShowBrowserAccountManagementUI(); | 28 void OnMsgShowBrowserAccountManagementUI(); |
30 void OnMsgGetManagedAccounts(const GURL& url, | 29 void OnMsgGetManagedAccounts(const GURL& url, |
31 std::vector<std::string>* managed_accounts); | 30 std::vector<std::string>* managed_accounts); |
32 | 31 |
33 int render_process_id_; | 32 int render_process_id_; |
34 | 33 |
35 DISALLOW_COPY_AND_ASSIGN(PrincipalsMessageFilter); | 34 DISALLOW_COPY_AND_ASSIGN(PrincipalsMessageFilter); |
36 }; | 35 }; |
37 | 36 |
38 #endif // CHROME_BROWSER_SIGNIN_PRINCIPALS_MESSAGE_FILTER_H_ | 37 #endif // CHROME_BROWSER_SIGNIN_PRINCIPALS_MESSAGE_FILTER_H_ |
OLD | NEW |