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_
10 #include "base/memory/scoped_ptr.h"
13 class RenderFrameHost
;
17 namespace launcher_search_provider
{
19 // A utility class which sends error message to developer console.
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();
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_