Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / chromeos / launcher_search_provider / error_reporter.h
blob250265fa824ab1bce284e4aa9f35eaaf4805fe53
1 // Copyright 2015 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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_ERROR_REPORTER_H_
6 #define CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_ERROR_REPORTER_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 namespace content {
13 class RenderFrameHost;
16 namespace chromeos {
17 namespace launcher_search_provider {
19 // A utility class which sends error message to developer console.
20 class ErrorReporter {
21 public:
22 explicit ErrorReporter(content::RenderFrameHost* host);
23 virtual ~ErrorReporter();
25 // Shows |message| as warning in the developer console of the extension.
26 virtual void Warn(const std::string& message);
28 // Duplicate the instance. Since ErrorReporter is handled as scoped_ptr in the
29 // code, we need this to duplicate error reporter to set it to each result.
30 virtual scoped_ptr<ErrorReporter> Duplicate();
32 private:
33 // Not owned.
34 content::RenderFrameHost* host_;
36 DISALLOW_COPY_AND_ASSIGN(ErrorReporter);
39 } // namespace launcher_search_provider
40 } // namespace chromeos
42 #endif // CHROME_BROWSER_CHROMEOS_LAUNCHER_SEARCH_PROVIDER_ERROR_REPORTER_H_