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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 // If this is a popup, we must wait for the CreatingNew_ACK message before | 394 // If this is a popup, we must wait for the CreatingNew_ACK message before |
395 // completing initialization. Otherwise, we can finish it now. | 395 // completing initialization. Otherwise, we can finish it now. |
396 if (opener_id == MSG_ROUTING_NONE) { | 396 if (opener_id == MSG_ROUTING_NONE) { |
397 did_show_ = true; | 397 did_show_ = true; |
398 CompleteInit(parent_hwnd); | 398 CompleteInit(parent_hwnd); |
399 } | 399 } |
400 | 400 |
401 g_view_map.Get().insert(std::make_pair(webview(), this)); | 401 g_view_map.Get().insert(std::make_pair(webview(), this)); |
402 webkit_preferences_.Apply(webview()); | 402 webkit_preferences_.Apply(webview()); |
403 webview()->initializeMainFrame(this); | 403 webview()->initializeMainFrame(this); |
404 if (!frame_name.empty()) | |
405 webview()->mainFrame()->setName(frame_name); | |
406 webview()->settings()->setMinimumTimerInterval( | 404 webview()->settings()->setMinimumTimerInterval( |
407 is_hidden() ? webkit_glue::kBackgroundTabTimerInterval : | 405 is_hidden() ? webkit_glue::kBackgroundTabTimerInterval : |
408 webkit_glue::kForegroundTabTimerInterval); | 406 webkit_glue::kForegroundTabTimerInterval); |
409 | 407 |
410 OnSetRendererPrefs(renderer_prefs); | 408 OnSetRendererPrefs(renderer_prefs); |
411 | 409 |
412 host_window_ = parent_hwnd; | 410 host_window_ = parent_hwnd; |
413 | 411 |
414 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 412 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
415 if (command_line.HasSwitch(switches::kEnableAccessibility)) | 413 if (command_line.HasSwitch(switches::kEnableAccessibility)) |
(...skipping 4169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4585 } | 4583 } |
4586 | 4584 |
4587 void RenderView::OnEnableViewSourceMode() { | 4585 void RenderView::OnEnableViewSourceMode() { |
4588 if (!webview()) | 4586 if (!webview()) |
4589 return; | 4587 return; |
4590 WebFrame* main_frame = webview()->mainFrame(); | 4588 WebFrame* main_frame = webview()->mainFrame(); |
4591 if (!main_frame) | 4589 if (!main_frame) |
4592 return; | 4590 return; |
4593 main_frame->enableViewSourceMode(true); | 4591 main_frame->enableViewSourceMode(true); |
4594 } | 4592 } |
OLD | NEW |