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

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

Issue 8746001: Rebase ConfirmBubble on the new views bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore the ConfirmBubbleModel::Show NativeView argument. Created 9 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/confirm_bubble_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/spellchecker_submenu_observer.h" 5 #include "chrome/browser/tab_contents/spellchecker_submenu_observer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/prefs/pref_member.h" 10 #include "chrome/browser/prefs/pref_member.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 rvh->routing_id(), SpellCheckerPlatform::SpellingPanelVisible())); 200 rvh->routing_id(), SpellCheckerPlatform::SpellingPanelVisible()));
201 break; 201 break;
202 202
203 #if defined(OS_WIN) 203 #if defined(OS_WIN)
204 case IDC_CONTENT_CONTEXT_SPELLING_TOGGLE: 204 case IDC_CONTENT_CONTEXT_SPELLING_TOGGLE:
205 // When a user chooses the "Ask Google for spelling suggestions" item, we 205 // When a user chooses the "Ask Google for spelling suggestions" item, we
206 // show a bubble to confirm it. On the other hand, when a user chooses the 206 // show a bubble to confirm it. On the other hand, when a user chooses the
207 // "Stop asking Google for spelling suggestions" item, we directly update 207 // "Stop asking Google for spelling suggestions" item, we directly update
208 // the profile and stop integrating the spelling service immediately. 208 // the profile and stop integrating the spelling service immediately.
209 if (!integrate_spelling_service_) { 209 if (!integrate_spelling_service_) {
210 gfx::Rect bounds = rvh->view()->GetViewBounds(); 210 gfx::Rect rect = rvh->view()->GetViewBounds();
211 bounds.Inset(bounds.width() / 2, 0); 211 ConfirmBubbleModel::Show(rvh->view()->GetNativeView(),
212 ConfirmBubbleModel::Show(rvh->view()->GetNativeView(), bounds.origin(), 212 gfx::Point(rect.CenterPoint().x(), rect.y()),
213 new SpellingBubbleModel(proxy_->GetProfile())); 213 new SpellingBubbleModel(proxy_->GetProfile()));
214 } else { 214 } else {
215 Profile* profile = proxy_->GetProfile(); 215 Profile* profile = proxy_->GetProfile();
216 if (profile) 216 if (profile)
217 profile->GetPrefs()->SetBoolean(prefs::kSpellCheckUseSpellingService, 217 profile->GetPrefs()->SetBoolean(prefs::kSpellCheckUseSpellingService,
218 false); 218 false);
219 } 219 }
220 break; 220 break;
221 #endif 221 #endif
222 } 222 }
223 } 223 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/confirm_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698