| 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_OUT_OF_PROCESS_INSTANCE_H_ | 5 #ifndef PDF_OUT_OF_PROCESS_INSTANCE_H_ |
| 6 #define PDF_OUT_OF_PROCESS_INSTANCE_H_ | 6 #define PDF_OUT_OF_PROCESS_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 void LoadUrl(const std::string& url); | 166 void LoadUrl(const std::string& url); |
| 167 void LoadPreviewUrl(const std::string& url); | 167 void LoadPreviewUrl(const std::string& url); |
| 168 void LoadUrlInternal(const std::string& url, pp::URLLoader* loader, | 168 void LoadUrlInternal(const std::string& url, pp::URLLoader* loader, |
| 169 void (OutOfProcessInstance::* method)(int32_t)); | 169 void (OutOfProcessInstance::* method)(int32_t)); |
| 170 | 170 |
| 171 // Creates a URL loader and allows it to access all urls, i.e. not just the | 171 // Creates a URL loader and allows it to access all urls, i.e. not just the |
| 172 // frame's origin. | 172 // frame's origin. |
| 173 pp::URLLoader CreateURLLoaderInternal(); | 173 pp::URLLoader CreateURLLoaderInternal(); |
| 174 | 174 |
| 175 // Figure out the initial page to display based on #page=N and #nameddest=foo | |
| 176 // in the |url_|. | |
| 177 // Returns -1 if there is no valid fragment. The returned value is 0-based, | |
| 178 // whereas page=N is 1-based. | |
| 179 int GetInitialPage(const std::string& url); | |
| 180 | |
| 181 void FormDidOpen(int32_t result); | 175 void FormDidOpen(int32_t result); |
| 182 | 176 |
| 183 std::string GetLocalizedString(PP_ResourceString id); | 177 std::string GetLocalizedString(PP_ResourceString id); |
| 184 | 178 |
| 185 void UserMetricsRecordAction(const std::string& action); | 179 void UserMetricsRecordAction(const std::string& action); |
| 186 | 180 |
| 187 enum DocumentLoadState { | 181 enum DocumentLoadState { |
| 188 LOAD_STATE_LOADING, | 182 LOAD_STATE_LOADING, |
| 189 LOAD_STATE_COMPLETE, | 183 LOAD_STATE_COMPLETE, |
| 190 LOAD_STATE_FAILED, | 184 LOAD_STATE_FAILED, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // document finishes loading. | 330 // document finishes loading. |
| 337 bool did_call_start_loading_; | 331 bool did_call_start_loading_; |
| 338 | 332 |
| 339 // If this is true, then don't scroll the plugin in response to DidChangeView | 333 // If this is true, then don't scroll the plugin in response to DidChangeView |
| 340 // messages. This will be true when the extension page is in the process of | 334 // messages. This will be true when the extension page is in the process of |
| 341 // zooming the plugin so that flickering doesn't occur while zooming. | 335 // zooming the plugin so that flickering doesn't occur while zooming. |
| 342 bool stop_scrolling_; | 336 bool stop_scrolling_; |
| 343 | 337 |
| 344 // The background color of the PDF viewer. | 338 // The background color of the PDF viewer. |
| 345 uint32 background_color_; | 339 uint32 background_color_; |
| 340 |
| 341 DISALLOW_COPY_AND_ASSIGN(OutOfProcessInstance); |
| 346 }; | 342 }; |
| 347 | 343 |
| 348 } // namespace chrome_pdf | 344 } // namespace chrome_pdf |
| 349 | 345 |
| 350 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ | 346 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ |
| OLD | NEW |