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

Side by Side Diff: pdf/out_of_process_instance.h

Issue 347763007: Improve scrolling performance in OOP PDF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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_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>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "pdf/paint_manager.h" 15 #include "pdf/paint_manager.h"
16 #include "pdf/pdf_engine.h" 16 #include "pdf/pdf_engine.h"
17 #include "pdf/preview_mode_client.h" 17 #include "pdf/preview_mode_client.h"
18 18
19 #include "ppapi/c/private/ppb_pdf.h" 19 #include "ppapi/c/private/ppb_pdf.h"
20 #include "ppapi/cpp/dev/printing_dev.h" 20 #include "ppapi/cpp/dev/printing_dev.h"
21 #include "ppapi/cpp/dev/scriptable_object_deprecated.h" 21 #include "ppapi/cpp/dev/scriptable_object_deprecated.h"
22 #include "ppapi/cpp/dev/selection_dev.h" 22 #include "ppapi/cpp/dev/selection_dev.h"
23 #include "ppapi/cpp/graphics_2d.h" 23 #include "ppapi/cpp/graphics_2d.h"
24 #include "ppapi/cpp/image_data.h" 24 #include "ppapi/cpp/image_data.h"
25 #include "ppapi/cpp/input_event.h" 25 #include "ppapi/cpp/input_event.h"
26 #include "ppapi/cpp/instance.h" 26 #include "ppapi/cpp/instance.h"
27 #include "ppapi/cpp/private/find_private.h" 27 #include "ppapi/cpp/private/find_private.h"
28 #include "ppapi/cpp/private/uma_private.h" 28 #include "ppapi/cpp/private/uma_private.h"
29 #include "ppapi/cpp/private/var_private.h"
30 #include "ppapi/cpp/url_loader.h" 29 #include "ppapi/cpp/url_loader.h"
31 #include "ppapi/utility/completion_callback_factory.h" 30 #include "ppapi/utility/completion_callback_factory.h"
32 31
33 namespace pp { 32 namespace pp {
34 class TextInput_Dev; 33 class TextInput_Dev;
35 } 34 }
36 35
37 namespace chrome_pdf { 36 namespace chrome_pdf {
38 37
39 class OutOfProcessInstance : public pp::Instance, 38 class OutOfProcessInstance : public pp::Instance,
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 276
278 // Used for printing without re-entrancy issues. 277 // Used for printing without re-entrancy issues.
279 pp::CompletionCallbackFactory<OutOfProcessInstance> print_callback_factory_; 278 pp::CompletionCallbackFactory<OutOfProcessInstance> print_callback_factory_;
280 279
281 // True if we haven't painted the plugin viewport yet. 280 // True if we haven't painted the plugin viewport yet.
282 bool first_paint_; 281 bool first_paint_;
283 282
284 DocumentLoadState document_load_state_; 283 DocumentLoadState document_load_state_;
285 DocumentLoadState preview_document_load_state_; 284 DocumentLoadState preview_document_load_state_;
286 285
287 // JavaScript interface to control this instance.
288 // This wraps a PDFScriptableObject in a pp::Var.
289 pp::VarPrivate instance_object_;
290
291 // A UMA resource for histogram reporting. 286 // A UMA resource for histogram reporting.
292 pp::UMAPrivate uma_; 287 pp::UMAPrivate uma_;
293 288
294 // Used so that we only tell the browser once about an unsupported feature, to 289 // Used so that we only tell the browser once about an unsupported feature, to
295 // avoid the infobar going up more than once. 290 // avoid the infobar going up more than once.
296 bool told_browser_about_unsupported_feature_; 291 bool told_browser_about_unsupported_feature_;
297 292
298 // Keeps track of which unsupported features we reported, so we avoid spamming 293 // Keeps track of which unsupported features we reported, so we avoid spamming
299 // the stats if a feature shows up many times per document. 294 // the stats if a feature shows up many times per document.
300 std::set<std::string> unsupported_features_reported_; 295 std::set<std::string> unsupported_features_reported_;
(...skipping 25 matching lines...) Expand all
326 321
327 // Whether the plugin has received a viewport changed message. Nothing should 322 // Whether the plugin has received a viewport changed message. Nothing should
328 // be painted until this is received. 323 // be painted until this is received.
329 bool received_viewport_message_; 324 bool received_viewport_message_;
330 325
331 // If true, this means we told the RenderView that we're starting a network 326 // If true, this means we told the RenderView that we're starting a network
332 // request so that it can start the throbber. We will tell it again once the 327 // request so that it can start the throbber. We will tell it again once the
333 // document finishes loading. 328 // document finishes loading.
334 bool did_call_start_loading_; 329 bool did_call_start_loading_;
335 330
331 // If this is true, then don't scroll the plugin in response to DidChangeView
332 // messages. This will be true when the extension page is in the process of
333 // zooming the plugin so that flickering doesn't occur while zooming.
334 bool stop_scrolling_;
335
336 // The callback for receiving the password from the page. 336 // The callback for receiving the password from the page.
337 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_; 337 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_;
338 }; 338 };
339 339
340 } // namespace chrome_pdf 340 } // namespace chrome_pdf
341 341
342 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ 342 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698