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

Side by Side Diff: components/plugins/renderer/loadable_plugin_placeholder.cc

Issue 2855123003: Remove rendundant WebLocalFrame parameter in various plugin code. (Closed)
Patch Set: Fix Android Created 3 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/plugins/renderer/loadable_plugin_placeholder.h" 5 #include "components/plugins/renderer/loadable_plugin_placeholder.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void LoadablePluginPlaceholder::SetPremadePlugin( 52 void LoadablePluginPlaceholder::SetPremadePlugin(
53 content::PluginInstanceThrottler* throttler) { 53 content::PluginInstanceThrottler* throttler) {
54 DCHECK(throttler); 54 DCHECK(throttler);
55 DCHECK(!premade_throttler_); 55 DCHECK(!premade_throttler_);
56 heuristic_run_before_ = true; 56 heuristic_run_before_ = true;
57 premade_throttler_ = throttler; 57 premade_throttler_ = throttler;
58 } 58 }
59 59
60 LoadablePluginPlaceholder::LoadablePluginPlaceholder( 60 LoadablePluginPlaceholder::LoadablePluginPlaceholder(
61 RenderFrame* render_frame, 61 RenderFrame* render_frame,
62 blink::WebLocalFrame* frame,
63 const blink::WebPluginParams& params, 62 const blink::WebPluginParams& params,
64 const std::string& html_data) 63 const std::string& html_data)
65 : PluginPlaceholderBase(render_frame, frame, params, html_data), 64 : PluginPlaceholderBase(render_frame, params, html_data),
66 heuristic_run_before_(false), 65 heuristic_run_before_(false),
67 is_blocked_for_tinyness_(false), 66 is_blocked_for_tinyness_(false),
68 is_blocked_for_background_tab_(false), 67 is_blocked_for_background_tab_(false),
69 is_blocked_for_prerendering_(false), 68 is_blocked_for_prerendering_(false),
70 is_blocked_for_power_saver_poster_(false), 69 is_blocked_for_power_saver_poster_(false),
71 power_saver_enabled_(false), 70 power_saver_enabled_(false),
72 premade_throttler_(nullptr), 71 premade_throttler_(nullptr),
73 allow_loading_(false), 72 allow_loading_(false),
74 finished_loading_(false), 73 finished_loading_(false),
75 weak_factory_(this) {} 74 weak_factory_(this) {}
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 return identifier_; 374 return identifier_;
376 } 375 }
377 376
378 bool LoadablePluginPlaceholder::LoadingBlocked() const { 377 bool LoadablePluginPlaceholder::LoadingBlocked() const {
379 DCHECK(allow_loading_); 378 DCHECK(allow_loading_);
380 return is_blocked_for_tinyness_ || is_blocked_for_background_tab_ || 379 return is_blocked_for_tinyness_ || is_blocked_for_background_tab_ ||
381 is_blocked_for_power_saver_poster_ || is_blocked_for_prerendering_; 380 is_blocked_for_power_saver_poster_ || is_blocked_for_prerendering_;
382 } 381 }
383 382
384 } // namespace plugins 383 } // namespace plugins
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698