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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. Created 3 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/renderer/browser_plugin/browser_plugin.h" 5 #include "content/renderer/browser_plugin/browser_plugin.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8
9 #include <map>
10 #include <string>
8 #include <utility> 11 #include <utility>
12 #include <vector>
9 13
10 #include "base/command_line.h" 14 #include "base/command_line.h"
11 #include "base/location.h" 15 #include "base/location.h"
12 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
13 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
15 #include "base/threading/thread_task_runner_handle.h" 19 #include "base/threading/thread_task_runner_handle.h"
16 #include "cc/surfaces/surface.h" 20 #include "cc/surfaces/surface.h"
17 #include "cc/surfaces/surface_info.h" 21 #include "cc/surfaces/surface_info.h"
18 #include "content/common/browser_plugin/browser_plugin_constants.h" 22 #include "content/common/browser_plugin/browser_plugin_constants.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 156
153 BrowserPluginHostMsg_Attach_Params attach_params; 157 BrowserPluginHostMsg_Attach_Params attach_params;
154 attach_params.focused = ShouldGuestBeFocused(); 158 attach_params.focused = ShouldGuestBeFocused();
155 attach_params.visible = visible_; 159 attach_params.visible = visible_;
156 attach_params.view_rect = view_rect(); 160 attach_params.view_rect = view_rect();
157 attach_params.is_full_page_plugin = false; 161 attach_params.is_full_page_plugin = false;
158 if (Container()) { 162 if (Container()) {
159 blink::WebLocalFrame* frame = Container()->GetDocument().GetFrame(); 163 blink::WebLocalFrame* frame = Container()->GetDocument().GetFrame();
160 attach_params.is_full_page_plugin = 164 attach_params.is_full_page_plugin =
161 frame->View()->MainFrame()->IsWebLocalFrame() && 165 frame->View()->MainFrame()->IsWebLocalFrame() &&
162 frame->View()->MainFrame()->GetDocument().IsPluginDocument(); 166 frame->View()
167 ->MainFrame()
168 ->ToWebLocalFrame()
169 ->GetDocument()
170 .IsPluginDocument();
163 } 171 }
164 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_Attach( 172 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_Attach(
165 render_frame_routing_id_, 173 render_frame_routing_id_,
166 browser_plugin_instance_id_, 174 browser_plugin_instance_id_,
167 attach_params)); 175 attach_params));
168 176
169 attached_ = true; 177 attached_ = true;
170 178
171 // Post an update event to the associated accessibility object. 179 // Post an update event to the associated accessibility object.
172 auto* render_frame = 180 auto* render_frame =
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 643
636 bool BrowserPlugin::HandleMouseLockedInputEvent( 644 bool BrowserPlugin::HandleMouseLockedInputEvent(
637 const blink::WebMouseEvent& event) { 645 const blink::WebMouseEvent& event) {
638 BrowserPluginManager::Get()->Send( 646 BrowserPluginManager::Get()->Send(
639 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, 647 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_,
640 &event)); 648 &event));
641 return true; 649 return true;
642 } 650 }
643 651
644 } // namespace content 652 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698