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/tab_contents/spelling_menu_observer.h" | 5 #include "chrome/browser/tab_contents/spelling_menu_observer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
| 10 #include "base/prefs/pref_service.h" |
10 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
11 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.h" |
12 #include "chrome/browser/prefs/pref_service.h" | |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/spellchecker/spellcheck_factory.h" | 14 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
15 #include "chrome/browser/spellchecker/spellcheck_service.h" | |
16 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" | 15 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" |
17 #include "chrome/browser/spellchecker/spellcheck_platform_mac.h" | 16 #include "chrome/browser/spellchecker/spellcheck_platform_mac.h" |
| 17 #include "chrome/browser/spellchecker/spellcheck_service.h" |
18 #include "chrome/browser/spellchecker/spelling_service_client.h" | 18 #include "chrome/browser/spellchecker/spelling_service_client.h" |
19 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 19 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
20 #include "chrome/browser/tab_contents/spelling_bubble_model.h" | 20 #include "chrome/browser/tab_contents/spelling_bubble_model.h" |
21 #include "chrome/browser/ui/confirm_bubble.h" | 21 #include "chrome/browser/ui/confirm_bubble.h" |
22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
24 #include "chrome/common/spellcheck_result.h" | 24 #include "chrome/common/spellcheck_result.h" |
25 #include "content/public/browser/render_view_host.h" | 25 #include "content/public/browser/render_view_host.h" |
26 #include "content/public/browser/render_widget_host_view.h" | 26 #include "content/public/browser/render_widget_host_view.h" |
27 #include "content/public/common/context_menu_params.h" | 27 #include "content/public/common/context_menu_params.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 void SpellingMenuObserver::OnAnimationTimerExpired() { | 352 void SpellingMenuObserver::OnAnimationTimerExpired() { |
353 // Append '.' characters to the end of "Checking". | 353 // Append '.' characters to the end of "Checking". |
354 loading_frame_ = (loading_frame_ + 1) & 3; | 354 loading_frame_ = (loading_frame_ + 1) & 3; |
355 string16 loading_message = loading_message_ + string16(loading_frame_,'.'); | 355 string16 loading_message = loading_message_ + string16(loading_frame_,'.'); |
356 | 356 |
357 // Update the menu item with the text. We disable this item to prevent users | 357 // Update the menu item with the text. We disable this item to prevent users |
358 // from selecting it. | 358 // from selecting it. |
359 proxy_->UpdateMenuItem(IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION, false, false, | 359 proxy_->UpdateMenuItem(IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION, false, false, |
360 loading_message); | 360 loading_message); |
361 } | 361 } |
OLD | NEW |