| OLD | NEW |
| 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 "content/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/debug/stack_trace.h" | |
| 15 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
| 16 #include "base/json/json_reader.h" | 15 #include "base/json/json_reader.h" |
| 17 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
| 18 #include "base/metrics/field_trial.h" | 17 #include "base/metrics/field_trial.h" |
| 19 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
| 20 #include "base/stl_util.h" | 19 #include "base/stl_util.h" |
| 21 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
| 22 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
| 23 #include "base/sys_info.h" | 22 #include "base/sys_info.h" |
| 24 #include "base/time/time.h" | 23 #include "base/time/time.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 params.opener_route_id = opener_route_id; | 289 params.opener_route_id = opener_route_id; |
| 291 params.swapped_out = !is_active_; | 290 params.swapped_out = !is_active_; |
| 292 params.proxy_routing_id = proxy_route_id; | 291 params.proxy_routing_id = proxy_route_id; |
| 293 params.hidden = is_hidden(); | 292 params.hidden = is_hidden(); |
| 294 params.never_visible = delegate_->IsNeverVisible(); | 293 params.never_visible = delegate_->IsNeverVisible(); |
| 295 params.window_was_created_with_opener = window_was_created_with_opener; | 294 params.window_was_created_with_opener = window_was_created_with_opener; |
| 296 params.next_page_id = next_page_id; | 295 params.next_page_id = next_page_id; |
| 297 params.enable_auto_resize = auto_resize_enabled(); | 296 params.enable_auto_resize = auto_resize_enabled(); |
| 298 params.min_size = min_size_for_auto_resize(); | 297 params.min_size = min_size_for_auto_resize(); |
| 299 params.max_size = max_size_for_auto_resize(); | 298 params.max_size = max_size_for_auto_resize(); |
| 300 // TODO(lfg): Temporary. Only to help track http://crbug.com/464633. | |
| 301 base::debug::StackTrace trace; | |
| 302 size_t count; | |
| 303 const void* const* addresses = trace.Addresses(&count); | |
| 304 params.debug_info.reserve(count); | |
| 305 for (size_t i = 0; i < count; i++) | |
| 306 params.debug_info.push_back(reinterpret_cast<unsigned long>(addresses[i])); | |
| 307 GetResizeParams(¶ms.initial_size); | 299 GetResizeParams(¶ms.initial_size); |
| 308 if (!is_active_) { | 300 if (!is_active_) { |
| 309 params.replicated_frame_state = | 301 params.replicated_frame_state = |
| 310 static_cast<RenderFrameHostImpl*>(GetMainFrame())->frame_tree_node() | 302 static_cast<RenderFrameHostImpl*>(GetMainFrame())->frame_tree_node() |
| 311 ->current_replication_state(); | 303 ->current_replication_state(); |
| 312 } | 304 } |
| 313 | 305 |
| 314 if (!Send(new ViewMsg_New(params))) | 306 if (!Send(new ViewMsg_New(params))) |
| 315 return false; | 307 return false; |
| 316 SetInitialRenderSizeParams(params.initial_size); | 308 SetInitialRenderSizeParams(params.initial_size); |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1425 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1417 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1426 | 1418 |
| 1427 frame_tree->ResetForMainFrameSwap(); | 1419 frame_tree->ResetForMainFrameSwap(); |
| 1428 } | 1420 } |
| 1429 | 1421 |
| 1430 void RenderViewHostImpl::SelectWordAroundCaret() { | 1422 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1431 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1423 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1432 } | 1424 } |
| 1433 | 1425 |
| 1434 } // namespace content | 1426 } // namespace content |
| OLD | NEW |