| 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_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" | 8 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
| 9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
| 10 #include "chrome/common/extensions/api/feedback_private.h" | 10 #include "chrome/common/extensions/api/feedback_private.h" |
| 11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 | 14 |
| 15 class FeedbackService; | 15 class FeedbackService; |
| 16 | 16 |
| 17 using extensions::api::feedback_private::SystemInformation; | 17 using extensions::api::feedback_private::SystemInformation; |
| 18 | 18 |
| 19 class FeedbackPrivateAPI : public ProfileKeyedAPI { | 19 class FeedbackPrivateAPI : public ProfileKeyedAPI { |
| 20 public: | 20 public: |
| 21 explicit FeedbackPrivateAPI(Profile* profile); | 21 explicit FeedbackPrivateAPI(Profile* profile); |
| 22 virtual ~FeedbackPrivateAPI(); | 22 virtual ~FeedbackPrivateAPI(); |
| 23 | 23 |
| 24 FeedbackService* GetService() const; | 24 FeedbackService* GetService() const; |
| 25 void RequestFeedback(const std::string& description_template, | 25 void RequestFeedback(const std::string& description_template, |
| 26 const std::string& category_tag, | 26 const std::string& category_tag, |
| 27 const GURL& page_url, | 27 const GURL& page_url); |
| 28 const gfx::Rect& screen_size); | |
| 29 | 28 |
| 30 // ProfileKeyedAPI implementation. | 29 // ProfileKeyedAPI implementation. |
| 31 static ProfileKeyedAPIFactory<FeedbackPrivateAPI>* GetFactoryInstance(); | 30 static ProfileKeyedAPIFactory<FeedbackPrivateAPI>* GetFactoryInstance(); |
| 32 | 31 |
| 33 private: | 32 private: |
| 34 friend class ProfileKeyedAPIFactory<FeedbackPrivateAPI>; | 33 friend class ProfileKeyedAPIFactory<FeedbackPrivateAPI>; |
| 35 | 34 |
| 36 // ProfileKeyedAPI implementation. | 35 // ProfileKeyedAPI implementation. |
| 37 static const char* service_name() { | 36 static const char* service_name() { |
| 38 return "FeedbackPrivateAPI"; | 37 return "FeedbackPrivateAPI"; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 virtual ~FeedbackPrivateSendFeedbackFunction() {} | 90 virtual ~FeedbackPrivateSendFeedbackFunction() {} |
| 92 virtual bool RunImpl() OVERRIDE; | 91 virtual bool RunImpl() OVERRIDE; |
| 93 | 92 |
| 94 private: | 93 private: |
| 95 void OnCompleted(bool success); | 94 void OnCompleted(bool success); |
| 96 }; | 95 }; |
| 97 | 96 |
| 98 } // namespace extensions | 97 } // namespace extensions |
| 99 | 98 |
| 100 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H
_ | 99 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H
_ |
| OLD | NEW |