OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |