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

Side by Side Diff: pdf/pdf_engine.h

Issue 871403005: Switch the background color in PDF Viewer when using Material Design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rearrange function declarations Created 5 years, 10 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) 2012 The Chromium Authors. All rights reserved. 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 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 PDF_PDF_ENGINE_H_ 5 #ifndef PDF_PDF_ENGINE_H_
6 #define PDF_PDF_ENGINE_H_ 6 #define PDF_PDF_ENGINE_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 14 matching lines...) Expand all
25 #include "ppapi/cpp/size.h" 25 #include "ppapi/cpp/size.h"
26 #include "ppapi/cpp/url_loader.h" 26 #include "ppapi/cpp/url_loader.h"
27 #include "ppapi/cpp/var_array.h" 27 #include "ppapi/cpp/var_array.h"
28 28
29 namespace pp { 29 namespace pp {
30 class InputEvent; 30 class InputEvent;
31 class VarDictionary; 31 class VarDictionary;
32 } 32 }
33 33
34 const uint32 kBackgroundColor = 0xFFCCCCCC; 34 const uint32 kBackgroundColor = 0xFFCCCCCC;
35 const uint32 kBackgroundColorMaterial = 0xFFEEEEEE;
Alexandre Carlton 2015/01/29 04:48:56 raymes@: I am hesitant to shift these two variable
35 36
36 namespace chrome_pdf { 37 namespace chrome_pdf {
37 38
38 class Stream; 39 class Stream;
39 40
40 #if defined(OS_MACOSX) 41 #if defined(OS_MACOSX)
41 const uint32 kDefaultKeyModifier = PP_INPUTEVENT_MODIFIER_METAKEY; 42 const uint32 kDefaultKeyModifier = PP_INPUTEVENT_MODIFIER_METAKEY;
42 #else // !OS_MACOSX 43 #else // !OS_MACOSX
43 const uint32 kDefaultKeyModifier = PP_INPUTEVENT_MODIFIER_CONTROLKEY; 44 const uint32 kDefaultKeyModifier = PP_INPUTEVENT_MODIFIER_CONTROLKEY;
44 #endif // OS_MACOSX 45 #endif // OS_MACOSX
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Callback for timer that's set with ScheduleCallback(). 242 // Callback for timer that's set with ScheduleCallback().
242 virtual void OnCallback(int id) = 0; 243 virtual void OnCallback(int id) = 0;
243 // Gets the JSON representation of the PDF file 244 // Gets the JSON representation of the PDF file
244 virtual std::string GetPageAsJSON(int index) = 0; 245 virtual std::string GetPageAsJSON(int index) = 0;
245 // Gets the PDF document's print scaling preference. True if the document can 246 // Gets the PDF document's print scaling preference. True if the document can
246 // be scaled to fit. 247 // be scaled to fit.
247 virtual bool GetPrintScaling() = 0; 248 virtual bool GetPrintScaling() = 0;
248 // Returns number of copies to be printed. 249 // Returns number of copies to be printed.
249 virtual int GetCopiesToPrint() = 0; 250 virtual int GetCopiesToPrint() = 0;
250 251
252 // Retrieve the background color of the PDF viewer.
253 virtual uint32 GetBackgroundColor() = 0;
254 // Set the background color of the PDF viewer.
255 virtual void SetBackgroundColor(uint32 background_color) = 0;
256
251 // Returns a VarArray of Bookmarks, each a VarDictionary containing the 257 // Returns a VarArray of Bookmarks, each a VarDictionary containing the
252 // following key/values: 258 // following key/values:
253 // - "title" - a string Var. 259 // - "title" - a string Var.
254 // - "page" - an int Var. 260 // - "page" - an int Var.
255 // - "children" - a VarArray(), with each entry containing a VarDictionary of 261 // - "children" - a VarArray(), with each entry containing a VarDictionary of
256 // the same structure. 262 // the same structure.
257 virtual pp::VarArray GetBookmarks() = 0; 263 virtual pp::VarArray GetBookmarks() = 0;
258 264
259 // Append blank pages to make a 1-page document to a |num_pages| document. 265 // Append blank pages to make a 1-page document to a |num_pages| document.
260 // Always retain the first page data. 266 // Always retain the first page data.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 331
326 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. 332 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details.
327 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, 333 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
328 int pdf_buffer_size, int page_number, 334 int pdf_buffer_size, int page_number,
329 double* width, double* height) = 0; 335 double* width, double* height) = 0;
330 }; 336 };
331 337
332 } // namespace chrome_pdf 338 } // namespace chrome_pdf
333 339
334 #endif // PDF_PDF_ENGINE_H_ 340 #endif // PDF_PDF_ENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698