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

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

Issue 393763002: MacViews: Refactor ShowConfirmBubble to also take a gfx::NativeWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new approach: extra argument Created 6 years, 5 months 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 f43533810af4058cfcd3357eeddadabb192e437b..aed19202d36af4a43b1cf20ce14c1fccd964c3b5 100644
--- a/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
+++ b/chrome/browser/renderer_context_menu/spelling_menu_observer.cc
@@ -298,11 +298,8 @@ void SpellingMenuObserver::ExecuteCommand(int command_id) {
content::RenderViewHost* rvh = proxy_->GetRenderViewHost();
gfx::Rect rect = rvh->GetView()->GetViewBounds();
chrome::ShowConfirmBubble(
-#if defined(TOOLKIT_VIEWS)
proxy_->GetWebContents()->GetTopLevelNativeWindow(),
-#else
rvh->GetView()->GetNativeView(),
-#endif
gfx::Point(rect.CenterPoint().x(), rect.y()),
new SpellingBubbleModel(proxy_->GetProfile(),
proxy_->GetWebContents(),
@@ -327,12 +324,13 @@ void SpellingMenuObserver::ExecuteCommand(int command_id) {
if (!integrate_spelling_service_.GetValue()) {
content::RenderViewHost* rvh = proxy_->GetRenderViewHost();
gfx::Rect rect = rvh->GetView()->GetViewBounds();
- chrome::ShowConfirmBubble(rvh->GetView()->GetNativeView(),
- gfx::Point(rect.CenterPoint().x(), rect.y()),
- new SpellingBubbleModel(
- proxy_->GetProfile(),
- proxy_->GetWebContents(),
- true));
+ chrome::ShowConfirmBubble(
+ proxy_->GetWebContents()->GetTopLevelNativeWindow(),
+ rvh->GetView()->GetNativeView(),
+ gfx::Point(rect.CenterPoint().x(), rect.y()),
+ new SpellingBubbleModel(proxy_->GetProfile(),
+ proxy_->GetWebContents(),
+ true));
} else {
Profile* profile = proxy_->GetProfile();
if (profile) {
« 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