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

Unified Diff: chrome/browser/renderer_context_menu/spelling_menu_observer.cc

Issue 801043003: Change ShowConfirmBubble() to take model by scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_context_menu/spelling_menu_observer.cc
diff --git a/chrome/browser/renderer_context_menu/spelling_menu_observer.cc b/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
index 114206986fafc500c35e3453459e1d530161a882..5cdc005e5a459d4f9a410391de2698622f623d07 100644
--- a/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
+++ b/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
@@ -303,11 +303,13 @@ void SpellingMenuObserver::ExecuteCommand(int command_id) {
if (!integrate_spelling_service_.GetValue()) {
content::RenderViewHost* rvh = proxy_->GetRenderViewHost();
gfx::Rect rect = rvh->GetView()->GetViewBounds();
+ scoped_ptr<SpellingBubbleModel> model(
+ new SpellingBubbleModel(profile, proxy_->GetWebContents(), false));
chrome::ShowConfirmBubble(
proxy_->GetWebContents()->GetTopLevelNativeWindow(),
rvh->GetView()->GetNativeView(),
gfx::Point(rect.CenterPoint().x(), rect.y()),
- new SpellingBubbleModel(profile, proxy_->GetWebContents(), false));
+ model.Pass());
} else {
if (profile) {
profile->GetPrefs()->SetBoolean(prefs::kSpellCheckUseSpellingService,
@@ -327,11 +329,13 @@ void SpellingMenuObserver::ExecuteCommand(int command_id) {
if (!integrate_spelling_service_.GetValue()) {
content::RenderViewHost* rvh = proxy_->GetRenderViewHost();
gfx::Rect rect = rvh->GetView()->GetViewBounds();
+ scoped_ptr<SpellingBubbleModel> model(
+ new SpellingBubbleModel(profile, proxy_->GetWebContents(), true));
chrome::ShowConfirmBubble(
proxy_->GetWebContents()->GetTopLevelNativeWindow(),
rvh->GetView()->GetNativeView(),
gfx::Point(rect.CenterPoint().x(), rect.y()),
- new SpellingBubbleModel(profile, proxy_->GetWebContents(), true));
+ model.Pass());
} else {
if (profile) {
bool current_value = autocorrect_spelling_.GetValue();
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698