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 "chrome/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 existing_names->swap(names); | 208 existing_names->swap(names); |
209 existing_values->swap(values); | 209 existing_values->swap(values); |
210 } | 210 } |
211 | 211 |
212 #if defined(ENABLE_SPELLCHECK) | 212 #if defined(ENABLE_SPELLCHECK) |
213 class SpellCheckReplacer : public content::RenderViewVisitor { | 213 class SpellCheckReplacer : public content::RenderViewVisitor { |
214 public: | 214 public: |
215 explicit SpellCheckReplacer(SpellCheck* spellcheck) | 215 explicit SpellCheckReplacer(SpellCheck* spellcheck) |
216 : spellcheck_(spellcheck) {} | 216 : spellcheck_(spellcheck) {} |
217 virtual bool Visit(content::RenderView* render_view) OVERRIDE; | 217 virtual bool Visit(content::RenderView* render_view) override; |
218 | 218 |
219 private: | 219 private: |
220 SpellCheck* spellcheck_; // New shared spellcheck for all views. Weak Ptr. | 220 SpellCheck* spellcheck_; // New shared spellcheck for all views. Weak Ptr. |
221 DISALLOW_COPY_AND_ASSIGN(SpellCheckReplacer); | 221 DISALLOW_COPY_AND_ASSIGN(SpellCheckReplacer); |
222 }; | 222 }; |
223 | 223 |
224 bool SpellCheckReplacer::Visit(content::RenderView* render_view) { | 224 bool SpellCheckReplacer::Visit(content::RenderView* render_view) { |
225 SpellCheckProvider* provider = SpellCheckProvider::Get(render_view); | 225 SpellCheckProvider* provider = SpellCheckProvider::Get(render_view); |
226 DCHECK(provider); | 226 DCHECK(provider); |
227 provider->set_spellcheck(spellcheck_); | 227 provider->set_spellcheck(spellcheck_); |
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1570 content::BrowserPluginDelegate* | 1570 content::BrowserPluginDelegate* |
1571 ChromeContentRendererClient::CreateBrowserPluginDelegate( | 1571 ChromeContentRendererClient::CreateBrowserPluginDelegate( |
1572 content::RenderFrame* render_frame, | 1572 content::RenderFrame* render_frame, |
1573 const std::string& mime_type) { | 1573 const std::string& mime_type) { |
1574 #if defined(ENABLE_EXTENSIONS) | 1574 #if defined(ENABLE_EXTENSIONS) |
1575 return new extensions::GuestViewContainer(render_frame, mime_type); | 1575 return new extensions::GuestViewContainer(render_frame, mime_type); |
1576 #else | 1576 #else |
1577 return NULL; | 1577 return NULL; |
1578 #endif | 1578 #endif |
1579 } | 1579 } |
OLD | NEW |