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

Side by Side Diff: pdf/instance.h

Issue 420063002: OOP PDF - Add support for "zoom" open pdf parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | pdf/instance.cc » ('j') | pdf/instance.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_INSTANCE_H_ 5 #ifndef PDF_INSTANCE_H_
6 #define PDF_INSTANCE_H_ 6 #define PDF_INSTANCE_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 void LoadUrl(const std::string& url); 249 void LoadUrl(const std::string& url);
250 void LoadPreviewUrl(const std::string& url); 250 void LoadPreviewUrl(const std::string& url);
251 void LoadUrlInternal(const std::string& url, pp::URLLoader* loader, 251 void LoadUrlInternal(const std::string& url, pp::URLLoader* loader,
252 void (Instance::* method)(int32_t)); 252 void (Instance::* method)(int32_t));
253 253
254 // Creates a URL loader and allows it to access all urls, i.e. not just the 254 // Creates a URL loader and allows it to access all urls, i.e. not just the
255 // frame's origin. 255 // frame's origin.
256 pp::URLLoader CreateURLLoaderInternal(); 256 pp::URLLoader CreateURLLoaderInternal();
257 257
258 // Handle open pdf parameters.
259 void HandleOpenParameters(const std::string& url);
260 void HandleZoomParameter(const std::string& value);
261
258 // Figure out the initial page to display based on #page=N and #nameddest=foo 262 // Figure out the initial page to display based on #page=N and #nameddest=foo
259 // in the |url_|. 263 // in the |url_|.
260 // Returns -1 if there is no valid fragment. The returned value is 0-based, 264 // Returns -1 if there is no valid fragment. The returned value is 0-based,
261 // whereas page=N is 1-based. 265 // whereas page=N is 1-based.
262 int GetInitialPage(const std::string& url); 266 int GetInitialPage(const std::string& url);
263 267
264 void UpdateToolbarPosition(bool invalidate); 268 void UpdateToolbarPosition(bool invalidate);
265 void UpdateProgressBarPosition(bool invalidate); 269 void UpdateProgressBarPosition(bool invalidate);
266 void UpdatePageIndicatorPosition(bool invalidate); 270 void UpdatePageIndicatorPosition(bool invalidate);
267 271
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 const std::vector<pp::Var>& args, 521 const std::vector<pp::Var>& args,
518 pp::Var* exception); 522 pp::Var* exception);
519 523
520 private: 524 private:
521 Instance* instance_; 525 Instance* instance_;
522 }; 526 };
523 527
524 } // namespace chrome_pdf 528 } // namespace chrome_pdf
525 529
526 #endif // PDF_INSTANCE_H_ 530 #endif // PDF_INSTANCE_H_
OLDNEW
« no previous file with comments | « no previous file | pdf/instance.cc » ('j') | pdf/instance.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698