OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/renderer/plugins/chrome_plugin_placeholder.h" | 5 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 blink::WebLocalFrame* frame, | 56 blink::WebLocalFrame* frame, |
57 const blink::WebPluginParams& params, | 57 const blink::WebPluginParams& params, |
58 const std::string& html_data, | 58 const std::string& html_data, |
59 const base::string16& title) | 59 const base::string16& title) |
60 : plugins::LoadablePluginPlaceholder(render_frame, | 60 : plugins::LoadablePluginPlaceholder(render_frame, |
61 frame, | 61 frame, |
62 params, | 62 params, |
63 html_data), | 63 html_data), |
64 status_(ChromeViewHostMsg_GetPluginInfo_Status::kAllowed), | 64 status_(ChromeViewHostMsg_GetPluginInfo_Status::kAllowed), |
65 title_(title), | 65 title_(title), |
66 #if defined(ENABLE_PLUGIN_INSTALLATION) | |
67 placeholder_routing_id_(MSG_ROUTING_NONE), | |
68 #endif | |
69 has_host_(false), | |
70 context_menu_request_id_(0), | 66 context_menu_request_id_(0), |
71 ignore_updates_(false) { | 67 ignore_updates_(false) { |
72 RenderThread::Get()->AddObserver(this); | 68 RenderThread::Get()->AddObserver(this); |
73 } | 69 } |
74 | 70 |
75 ChromePluginPlaceholder::~ChromePluginPlaceholder() { | 71 ChromePluginPlaceholder::~ChromePluginPlaceholder() { |
76 RenderThread::Get()->RemoveObserver(this); | 72 RenderThread::Get()->RemoveObserver(this); |
77 if (context_menu_request_id_ && render_frame()) | 73 if (context_menu_request_id_ && render_frame()) |
78 render_frame()->CancelContextMenu(context_menu_request_id_); | 74 render_frame()->CancelContextMenu(context_menu_request_id_); |
79 | 75 |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 | 448 |
453 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 449 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
454 switches::kEnablePluginPlaceholderTesting)) { | 450 switches::kEnablePluginPlaceholderTesting)) { |
455 builder.SetMethod<void (ChromePluginPlaceholder::*)()>( | 451 builder.SetMethod<void (ChromePluginPlaceholder::*)()>( |
456 "didFinishIconRepositionForTesting", | 452 "didFinishIconRepositionForTesting", |
457 &ChromePluginPlaceholder::DidFinishIconRepositionForTestingCallback); | 453 &ChromePluginPlaceholder::DidFinishIconRepositionForTestingCallback); |
458 } | 454 } |
459 | 455 |
460 return builder; | 456 return builder; |
461 } | 457 } |
OLD | NEW |