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/browser/ui/webui/options/language_dictionary_overlay_handler.h" | 5 #include "chrome/browser/ui/webui/options/language_dictionary_overlay_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/spellchecker/spellcheck_factory.h" | 10 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
11 #include "chrome/browser/spellchecker/spellcheck_service.h" | 11 #include "chrome/browser/spellchecker/spellcheck_service.h" |
| 12 #include "chrome/grit/generated_resources.h" |
12 #include "content/public/browser/web_ui.h" | 13 #include "content/public/browser/web_ui.h" |
13 #include "grit/generated_resources.h" | |
14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
15 | 15 |
16 namespace options { | 16 namespace options { |
17 | 17 |
18 LanguageDictionaryOverlayHandler::LanguageDictionaryOverlayHandler() | 18 LanguageDictionaryOverlayHandler::LanguageDictionaryOverlayHandler() |
19 : overlay_initialized_(false), | 19 : overlay_initialized_(false), |
20 dictionary_(NULL) { | 20 dictionary_(NULL) { |
21 } | 21 } |
22 | 22 |
23 LanguageDictionaryOverlayHandler::~LanguageDictionaryOverlayHandler() { | 23 LanguageDictionaryOverlayHandler::~LanguageDictionaryOverlayHandler() { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 void LanguageDictionaryOverlayHandler::RemoveWord(const base::ListValue* args) { | 119 void LanguageDictionaryOverlayHandler::RemoveWord(const base::ListValue* args) { |
120 std::string old_word; | 120 std::string old_word; |
121 if (!args->GetString(0, &old_word) || old_word.empty() || !dictionary_) { | 121 if (!args->GetString(0, &old_word) || old_word.empty() || !dictionary_) { |
122 NOTREACHED(); | 122 NOTREACHED(); |
123 return; | 123 return; |
124 } | 124 } |
125 dictionary_->RemoveWord(old_word); | 125 dictionary_->RemoveWord(old_word); |
126 } | 126 } |
127 | 127 |
128 } // namespace options | 128 } // namespace options |
OLD | NEW |