Add mips support to install-debian.wheezy.sysroot.py
[chromium-blink-merge.git] / ppapi / proxy / pdf_resource.h
blobc701f8a9c97ca63d112a88906eacb6a2c23b61e6
1 // Copyright (c) 2013 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 PPAPI_PROXY_PDF_RESOURCE_H_
6 #define PPAPI_PROXY_PDF_RESOURCE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ppapi/c/pp_instance.h"
11 #include "ppapi/c/pp_var.h"
12 #include "ppapi/proxy/connection.h"
13 #include "ppapi/proxy/plugin_resource.h"
14 #include "ppapi/proxy/ppapi_proxy_export.h"
15 #include "ppapi/thunk/ppb_pdf_api.h"
17 namespace ppapi {
18 namespace proxy {
20 class PluginDispatcher;
22 class PPAPI_PROXY_EXPORT PDFResource
23 : public PluginResource,
24 public thunk::PPB_PDF_API {
25 public:
26 PDFResource(Connection connection, PP_Instance instance);
27 ~PDFResource() override;
29 // For unittesting with a given locale.
30 void SetLocaleForTest(const std::string& locale) {
31 locale_ = locale;
34 // Resource override.
35 thunk::PPB_PDF_API* AsPPB_PDF_API() override;
37 // PPB_PDF_API implementation.
38 PP_Var GetLocalizedString(PP_ResourceString string_id) override;
39 void SearchString(const unsigned short* input_string,
40 const unsigned short* input_term,
41 bool case_sensitive,
42 PP_PrivateFindResult** results,
43 int* count) override;
44 void DidStartLoading() override;
45 void DidStopLoading() override;
46 void SetContentRestriction(int restrictions) override;
47 void UserMetricsRecordAction(const PP_Var& action) override;
48 void HasUnsupportedFeature() override;
49 void Print() override;
50 void SaveAs() override;
51 PP_Bool IsFeatureEnabled(PP_PDFFeature feature) override;
52 void SetSelectedText(const char* selected_text) override;
53 void SetLinkUnderCursor(const char* url) override;
54 void GetV8ExternalSnapshotData(const char** natives_data_out,
55 int* natives_size_out,
56 const char** snapshot_data_out,
57 int* snapshot_size_out) override;
59 private:
60 std::string locale_;
62 DISALLOW_COPY_AND_ASSIGN(PDFResource);
65 } // namespace proxy
66 } // namespace ppapi
68 #endif // PPAPI_PROXY_PDF_RESOURCE_H_