Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: chrome/browser/tab_contents/spelling_menu_observer.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 7 #include <string>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/string_escape.h" 10 #include "base/json/string_escape.h"
(...skipping 16 matching lines...) Expand all
27 #if defined(GOOGLE_CHROME_BUILD) 27 #if defined(GOOGLE_CHROME_BUILD)
28 #include "chrome/browser/spellchecker/internal/spellcheck_internal.h" 28 #include "chrome/browser/spellchecker/internal/spellcheck_internal.h"
29 #else 29 #else
30 // Use a dummy URL and a key on Chromium to avoid build breaks until the 30 // Use a dummy URL and a key on Chromium to avoid build breaks until the
31 // Spelling API is released. These dummy parameters just cause a timeout and 31 // Spelling API is released. These dummy parameters just cause a timeout and
32 // show 'no suggestions found'. 32 // show 'no suggestions found'.
33 #define SPELLING_SERVICE_KEY 33 #define SPELLING_SERVICE_KEY
34 #define SPELLING_SERVICE_URL "http://127.0.0.1/rpc" 34 #define SPELLING_SERVICE_URL "http://127.0.0.1/rpc"
35 #endif 35 #endif
36 36
37 using content::BrowserThread;
38
37 SpellingMenuObserver::SpellingMenuObserver(RenderViewContextMenuProxy* proxy) 39 SpellingMenuObserver::SpellingMenuObserver(RenderViewContextMenuProxy* proxy)
38 : proxy_(proxy), 40 : proxy_(proxy),
39 loading_frame_(0), 41 loading_frame_(0),
40 succeeded_(false) { 42 succeeded_(false) {
41 } 43 }
42 44
43 SpellingMenuObserver::~SpellingMenuObserver() { 45 SpellingMenuObserver::~SpellingMenuObserver() {
44 } 46 }
45 47
46 void SpellingMenuObserver::InitMenu(const ContextMenuParams& params) { 48 void SpellingMenuObserver::InitMenu(const ContextMenuParams& params) {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 loading_frame_ = (loading_frame_ + 1) & 3; 268 loading_frame_ = (loading_frame_ + 1) & 3;
267 string16 loading_message = loading_message_; 269 string16 loading_message = loading_message_;
268 for (int i = 0; i < loading_frame_; ++i) 270 for (int i = 0; i < loading_frame_; ++i)
269 loading_message.push_back('.'); 271 loading_message.push_back('.');
270 272
271 // Update the menu item with the text. We disable this item to prevent users 273 // Update the menu item with the text. We disable this item to prevent users
272 // from selecting it. 274 // from selecting it.
273 proxy_->UpdateMenuItem(IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION, false, false, 275 proxy_->UpdateMenuItem(IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION, false, false,
274 loading_message); 276 loading_message);
275 } 277 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/spellchecker_submenu_observer.cc ('k') | chrome/browser/tab_contents/web_contents_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698