OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/render_thread.h" | 5 #include "chrome/renderer/render_thread.h" |
6 | 6 |
7 #include <v8.h> | 7 #include <v8.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 for (std::vector<CSSColors::CSSColorMapping>::const_iterator it = | 407 for (std::vector<CSSColors::CSSColorMapping>::const_iterator it = |
408 colors.begin(); | 408 colors.begin(); |
409 it != colors.end(); | 409 it != colors.end(); |
410 ++it, ++i) { | 410 ++it, ++i) { |
411 color_names[i] = it->first; | 411 color_names[i] = it->first; |
412 web_colors[i] = it->second; | 412 web_colors[i] = it->second; |
413 } | 413 } |
414 WebKit::setNamedColors(color_names.get(), web_colors.get(), num_colors); | 414 WebKit::setNamedColors(color_names.get(), web_colors.get(), num_colors); |
415 } | 415 } |
416 | 416 |
417 void RenderThread::OnCreateNewView(gfx::NativeViewId parent_hwnd, | 417 void RenderThread::OnCreateNewView(const ViewMsg_New_Params& params) { |
418 const RendererPreferences& renderer_prefs, | |
419 const WebPreferences& webkit_prefs, | |
420 int32 view_id) { | |
421 EnsureWebKitInitialized(); | 418 EnsureWebKitInitialized(); |
422 // When bringing in render_view, also bring in webkit's glue and jsbindings. | 419 // When bringing in render_view, also bring in webkit's glue and jsbindings. |
423 RenderView::Create( | 420 RenderView::Create( |
424 this, parent_hwnd, MSG_ROUTING_NONE, renderer_prefs, | 421 this, params.parent_window, MSG_ROUTING_NONE, params.renderer_preferences, |
425 webkit_prefs, new SharedRenderViewCounter(0), view_id); | 422 params.web_preferences, new SharedRenderViewCounter(0), params.view_id, |
| 423 params.session_storage_namespace_id); |
426 } | 424 } |
427 | 425 |
428 void RenderThread::OnSetCacheCapacities(size_t min_dead_capacity, | 426 void RenderThread::OnSetCacheCapacities(size_t min_dead_capacity, |
429 size_t max_dead_capacity, | 427 size_t max_dead_capacity, |
430 size_t capacity) { | 428 size_t capacity) { |
431 EnsureWebKitInitialized(); | 429 EnsureWebKitInitialized(); |
432 WebCache::setCapacities( | 430 WebCache::setCapacities( |
433 min_dead_capacity, max_dead_capacity, capacity); | 431 min_dead_capacity, max_dead_capacity, capacity); |
434 } | 432 } |
435 | 433 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 spellchecker_->EnableAutoSpellCorrect(auto_spell_correct); | 731 spellchecker_->EnableAutoSpellCorrect(auto_spell_correct); |
734 } | 732 } |
735 | 733 |
736 void RenderThread::OnSpellCheckWordAdded(const std::string& word) { | 734 void RenderThread::OnSpellCheckWordAdded(const std::string& word) { |
737 spellchecker_->WordAdded(word); | 735 spellchecker_->WordAdded(word); |
738 } | 736 } |
739 | 737 |
740 void RenderThread::OnSpellCheckEnableAutoSpellCorrect(bool enable) { | 738 void RenderThread::OnSpellCheckEnableAutoSpellCorrect(bool enable) { |
741 spellchecker_->EnableAutoSpellCorrect(enable); | 739 spellchecker_->EnableAutoSpellCorrect(enable); |
742 } | 740 } |
OLD | NEW |