OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/render_view.h" | 5 #include "content/renderer/render_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 // If this is a popup, we must wait for the CreatingNew_ACK message before | 398 // If this is a popup, we must wait for the CreatingNew_ACK message before |
399 // completing initialization. Otherwise, we can finish it now. | 399 // completing initialization. Otherwise, we can finish it now. |
400 if (opener_id == MSG_ROUTING_NONE) { | 400 if (opener_id == MSG_ROUTING_NONE) { |
401 did_show_ = true; | 401 did_show_ = true; |
402 CompleteInit(parent_hwnd); | 402 CompleteInit(parent_hwnd); |
403 } | 403 } |
404 | 404 |
405 g_view_map.Get().insert(std::make_pair(webview(), this)); | 405 g_view_map.Get().insert(std::make_pair(webview(), this)); |
406 webkit_preferences_.Apply(webview()); | 406 webkit_preferences_.Apply(webview()); |
407 webview()->initializeMainFrame(this); | 407 webview()->initializeMainFrame(this); |
408 if (!frame_name.empty()) | |
409 webview()->mainFrame()->setName(frame_name); | |
410 webview()->settings()->setMinimumTimerInterval( | 408 webview()->settings()->setMinimumTimerInterval( |
411 is_hidden() ? webkit_glue::kBackgroundTabTimerInterval : | 409 is_hidden() ? webkit_glue::kBackgroundTabTimerInterval : |
412 webkit_glue::kForegroundTabTimerInterval); | 410 webkit_glue::kForegroundTabTimerInterval); |
413 | 411 |
414 OnSetRendererPrefs(renderer_prefs); | 412 OnSetRendererPrefs(renderer_prefs); |
415 | 413 |
416 host_window_ = parent_hwnd; | 414 host_window_ = parent_hwnd; |
417 | 415 |
418 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 416 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
419 if (command_line.HasSwitch(switches::kEnableAccessibility)) | 417 if (command_line.HasSwitch(switches::kEnableAccessibility)) |
(...skipping 4187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4607 } | 4605 } |
4608 | 4606 |
4609 void RenderView::OnEnableViewSourceMode() { | 4607 void RenderView::OnEnableViewSourceMode() { |
4610 if (!webview()) | 4608 if (!webview()) |
4611 return; | 4609 return; |
4612 WebFrame* main_frame = webview()->mainFrame(); | 4610 WebFrame* main_frame = webview()->mainFrame(); |
4613 if (!main_frame) | 4611 if (!main_frame) |
4614 return; | 4612 return; |
4615 main_frame->enableViewSourceMode(true); | 4613 main_frame->enableViewSourceMode(true); |
4616 } | 4614 } |
OLD | NEW |