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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_printing_host.h

Issue 10826072: Implement browser side of PPB_Printing resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 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
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINTING_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINTING_HOST_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h"
11 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h"
12 #include "content/common/content_export.h"
13 #include "ppapi/host/resource_host.h"
14 #include "ppapi/proxy/resource_message_params.h"
15
16 namespace content {
17
18 class CONTENT_EXPORT PepperPrintingHost : public ppapi::host::ResourceHost {
19 public:
20 PepperPrintingHost(
21 ppapi::host::PpapiHost* host,
22 PP_Instance instance,
23 PP_Resource resource,
24 scoped_ptr<PepperPrintSettingsManager> print_settings_manager);
25 virtual ~PepperPrintingHost();
26
27 // ppapi::host::ResourceHost implementation.
28 virtual int32_t OnResourceMessageReceived(
29 const IPC::Message& msg,
30 ppapi::host::HostMessageContext* context) OVERRIDE;
31
32 private:
33 int32_t OnMsgGetDefaultPrintSettings(
34 ppapi::host::HostMessageContext* context);
35
36 void PrintSettingsCallback(
37 ppapi::proxy::ResourceMessageReplyParams reply_params,
38 PepperPrintSettingsManager::Result result);
39
40 scoped_ptr<PepperPrintSettingsManager> print_settings_manager_;
41
42 base::WeakPtrFactory<PepperPrintingHost> weak_factory_;
43
44 DISALLOW_COPY_AND_ASSIGN(PepperPrintingHost);
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINTING_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698