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

Side by Side Diff: ppapi/proxy/pdf_resource.h

Issue 1097393007: Update {virtual,override} to follow C++11 style in ppapi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split off one file into separate review. Created 5 years, 8 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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 PPAPI_PROXY_PDF_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_PDF_RESOURCE_H_
6 #define PPAPI_PROXY_PDF_RESOURCE_H_ 6 #define PPAPI_PROXY_PDF_RESOURCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ppapi/c/pp_instance.h" 10 #include "ppapi/c/pp_instance.h"
11 #include "ppapi/c/pp_var.h" 11 #include "ppapi/c/pp_var.h"
12 #include "ppapi/c/private/ppb_flash.h" 12 #include "ppapi/c/private/ppb_flash.h"
13 #include "ppapi/proxy/connection.h" 13 #include "ppapi/proxy/connection.h"
14 #include "ppapi/proxy/plugin_resource.h" 14 #include "ppapi/proxy/plugin_resource.h"
15 #include "ppapi/proxy/ppapi_proxy_export.h" 15 #include "ppapi/proxy/ppapi_proxy_export.h"
16 #include "ppapi/thunk/ppb_pdf_api.h" 16 #include "ppapi/thunk/ppb_pdf_api.h"
17 17
18 namespace ppapi { 18 namespace ppapi {
19 namespace proxy { 19 namespace proxy {
20 20
21 class PluginDispatcher; 21 class PluginDispatcher;
22 22
23 class PPAPI_PROXY_EXPORT PDFResource 23 class PPAPI_PROXY_EXPORT PDFResource
24 : public PluginResource, 24 : public PluginResource,
25 public thunk::PPB_PDF_API { 25 public thunk::PPB_PDF_API {
26 public: 26 public:
27 PDFResource(Connection connection, PP_Instance instance); 27 PDFResource(Connection connection, PP_Instance instance);
28 virtual ~PDFResource(); 28 ~PDFResource() override;
29 29
30 // For unittesting with a given locale. 30 // For unittesting with a given locale.
31 void SetLocaleForTest(const std::string& locale) { 31 void SetLocaleForTest(const std::string& locale) {
32 locale_ = locale; 32 locale_ = locale;
33 } 33 }
34 34
35 // Resource override. 35 // Resource override.
36 virtual thunk::PPB_PDF_API* AsPPB_PDF_API() override; 36 thunk::PPB_PDF_API* AsPPB_PDF_API() override;
37 37
38 // PPB_PDF_API implementation. 38 // PPB_PDF_API implementation.
39 PP_Var GetLocalizedString(PP_ResourceString string_id) override; 39 PP_Var GetLocalizedString(PP_ResourceString string_id) override;
40 virtual void SearchString(const unsigned short* input_string, 40 void SearchString(const unsigned short* input_string,
41 const unsigned short* input_term, 41 const unsigned short* input_term,
42 bool case_sensitive, 42 bool case_sensitive,
43 PP_PrivateFindResult** results, 43 PP_PrivateFindResult** results,
44 int* count) override; 44 int* count) override;
45 virtual void DidStartLoading() override; 45 void DidStartLoading() override;
46 virtual void DidStopLoading() override; 46 void DidStopLoading() override;
47 virtual void SetContentRestriction(int restrictions) override; 47 void SetContentRestriction(int restrictions) override;
48 virtual void HistogramPDFPageCount(int count) override; 48 void HistogramPDFPageCount(int count) override;
49 virtual void UserMetricsRecordAction(const PP_Var& action) override; 49 void UserMetricsRecordAction(const PP_Var& action) override;
50 virtual void HasUnsupportedFeature() override; 50 void HasUnsupportedFeature() override;
51 virtual void Print() override; 51 void Print() override;
52 virtual void SaveAs() override; 52 void SaveAs() override;
53 virtual PP_Bool IsFeatureEnabled(PP_PDFFeature feature) override; 53 PP_Bool IsFeatureEnabled(PP_PDFFeature feature) override;
54 virtual PP_Resource GetResourceImageForScale(PP_ResourceImage image_id, 54 PP_Resource GetResourceImageForScale(PP_ResourceImage image_id,
55 float scale) override; 55 float scale) override;
56 virtual PP_Resource GetResourceImage(PP_ResourceImage image_id) override; 56 PP_Resource GetResourceImage(PP_ResourceImage image_id) override;
57 virtual PP_Bool IsOutOfProcess() override; 57 PP_Bool IsOutOfProcess() override;
58 virtual void SetSelectedText(const char* selected_text) override; 58 void SetSelectedText(const char* selected_text) override;
59 virtual void SetLinkUnderCursor(const char* url) override; 59 void SetLinkUnderCursor(const char* url) override;
60 virtual void GetV8ExternalSnapshotData(const char** natives_data_out, 60 void GetV8ExternalSnapshotData(const char** natives_data_out,
61 int* natives_size_out, 61 int* natives_size_out,
62 const char** snapshot_data_out, 62 const char** snapshot_data_out,
63 int* snapshot_size_out) override; 63 int* snapshot_size_out) override;
64 64
65 private: 65 private:
66 std::string locale_; 66 std::string locale_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(PDFResource); 68 DISALLOW_COPY_AND_ASSIGN(PDFResource);
69 }; 69 };
70 70
71 } // namespace proxy 71 } // namespace proxy
72 } // namespace ppapi 72 } // namespace ppapi
73 73
74 #endif // PPAPI_PROXY_PDF_RESOURCE_H_ 74 #endif // PPAPI_PROXY_PDF_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/output_protection_resource.h ('k') | ppapi/proxy/platform_verification_private_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698