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

Side by Side Diff: pdf/page_indicator.cc

Issue 557493002: Fix uninitialized member from PageIndicator::PageIndicator(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
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 #include "pdf/page_indicator.h" 5 #include "pdf/page_indicator.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "pdf/draw_utils.h" 9 #include "pdf/draw_utils.h"
10 #include "pdf/number_image_generator.h" 10 #include "pdf/number_image_generator.h"
11 #include "pdf/resource_consts.h" 11 #include "pdf/resource_consts.h"
12 12
13 namespace chrome_pdf { 13 namespace chrome_pdf {
14 14
15 15
16 PageIndicator::PageIndicator() 16 PageIndicator::PageIndicator()
17 : current_page_(0), 17 : current_page_(0),
18 fade_out_timer_id_(0),
18 splash_timeout_(kPageIndicatorSplashTimeoutMs), 19 splash_timeout_(kPageIndicatorSplashTimeoutMs),
19 fade_timeout_(kPageIndicatorScrollFadeTimeoutMs), 20 fade_timeout_(kPageIndicatorScrollFadeTimeoutMs),
20 always_visible_(false) { 21 always_visible_(false) {
21 } 22 }
22 23
23 PageIndicator::~PageIndicator() { 24 PageIndicator::~PageIndicator() {
24 } 25 }
25 26
26 bool PageIndicator::CreatePageIndicator( 27 bool PageIndicator::CreatePageIndicator(
27 uint32 id, 28 uint32 id,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 Fade(true, fade_timeout_); 118 Fade(true, fade_timeout_);
118 } 119 }
119 120
120 int PageIndicator::GetYPosition( 121 int PageIndicator::GetYPosition(
121 int vertical_scrollbar_y, int document_height, int plugin_height) { 122 int vertical_scrollbar_y, int document_height, int plugin_height) {
122 double percent = static_cast<double>(vertical_scrollbar_y) / document_height; 123 double percent = static_cast<double>(vertical_scrollbar_y) / document_height;
123 return (plugin_height - rect().height()) * percent; 124 return (plugin_height - rect().height()) * percent;
124 } 125 }
125 126
126 } // namespace chrome_pdf 127 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698