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/prefs/pref_service.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.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_host_metrics.h" | 15 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" |
16 #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" | 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" |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 void SpellingMenuObserver::OnAnimationTimerExpired() { | 410 void SpellingMenuObserver::OnAnimationTimerExpired() { |
411 // Append '.' characters to the end of "Checking". | 411 // Append '.' characters to the end of "Checking". |
412 loading_frame_ = (loading_frame_ + 1) & 3; | 412 loading_frame_ = (loading_frame_ + 1) & 3; |
413 string16 loading_message = loading_message_ + string16(loading_frame_,'.'); | 413 string16 loading_message = loading_message_ + string16(loading_frame_,'.'); |
414 | 414 |
415 // Update the menu item with the text. We disable this item to prevent users | 415 // Update the menu item with the text. We disable this item to prevent users |
416 // from selecting it. | 416 // from selecting it. |
417 proxy_->UpdateMenuItem(IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION, false, false, | 417 proxy_->UpdateMenuItem(IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION, false, false, |
418 loading_message); | 418 loading_message); |
419 } | 419 } |
OLD | NEW |