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

Side by Side Diff: chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc

Issue 12897004: Remove BubbleDelegateView::Show(); call GetWidget()->Show() instead; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup more BubbleDelegateView::Show() calls. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/ui/views/sync/one_click_signin_bubble_view.h" 5 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/google/google_util.h" 10 #include "chrome/browser/google/google_util.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ToolbarView* toolbar_view, 197 ToolbarView* toolbar_view,
198 const BrowserWindow::StartSyncCallback& start_sync) { 198 const BrowserWindow::StartSyncCallback& start_sync) {
199 if (IsShowing()) 199 if (IsShowing())
200 return; 200 return;
201 201
202 bubble_view_ = type == BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE ? 202 bubble_view_ = type == BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE ?
203 new OneClickSigninBubbleView(toolbar_view->app_menu(), start_sync) : 203 new OneClickSigninBubbleView(toolbar_view->app_menu(), start_sync) :
204 new OneClickSigninDialogView(toolbar_view->GetWebContents(), 204 new OneClickSigninDialogView(toolbar_view->GetWebContents(),
205 toolbar_view->location_bar(), start_sync); 205 toolbar_view->location_bar(), start_sync);
206 206
207 views::BubbleDelegateView::CreateBubble(bubble_view_); 207 views::BubbleDelegateView::CreateBubble(bubble_view_)->Show();
208 bubble_view_->Show();
209 } 208 }
210 209
211 // static 210 // static
212 bool OneClickSigninBubbleView::IsShowing() { 211 bool OneClickSigninBubbleView::IsShowing() {
213 return bubble_view_ != NULL; 212 return bubble_view_ != NULL;
214 } 213 }
215 214
216 // static 215 // static
217 void OneClickSigninBubbleView::Hide() { 216 void OneClickSigninBubbleView::Hide() {
218 if (IsShowing()) 217 if (IsShowing())
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST); 353 OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST);
355 } 354 }
356 355
357 void OneClickSigninBubbleView::ButtonPressed(views::Button* sender, 356 void OneClickSigninBubbleView::ButtonPressed(views::Button* sender,
358 const ui::Event& event) { 357 const ui::Event& event) {
359 StartFade(false); 358 StartFade(false);
360 base::ResetAndReturn(&start_sync_callback_).Run((sender == ok_button_) ? 359 base::ResetAndReturn(&start_sync_callback_).Run((sender == ok_button_) ?
361 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS : 360 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS :
362 OneClickSigninSyncStarter::UNDO_SYNC); 361 OneClickSigninSyncStarter::UNDO_SYNC);
363 } 362 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698