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

Side by Side Diff: chrome/browser/ui/views/fullscreen_exit_bubble_views.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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/fullscreen_exit_bubble_views.h" 5 #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" 10 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // This is tricky. We may be in an ATL message handler stack, in which case 315 // This is tricky. We may be in an ATL message handler stack, in which case
316 // the popup cannot be deleted yet. We also can't set the popup's ownership 316 // the popup cannot be deleted yet. We also can't set the popup's ownership
317 // model to NATIVE_WIDGET_OWNS_WIDGET because if the user closed the last tab 317 // model to NATIVE_WIDGET_OWNS_WIDGET because if the user closed the last tab
318 // while in fullscreen mode, Windows has already destroyed the popup HWND by 318 // while in fullscreen mode, Windows has already destroyed the popup HWND by
319 // the time we get here, and thus either the popup will already have been 319 // the time we get here, and thus either the popup will already have been
320 // deleted (if we set this in our constructor) or the popup will never get 320 // deleted (if we set this in our constructor) or the popup will never get
321 // another OnFinalMessage() call (if not, as currently). So instead, we tell 321 // another OnFinalMessage() call (if not, as currently). So instead, we tell
322 // the popup to synchronously hide, and then asynchronously close and delete 322 // the popup to synchronously hide, and then asynchronously close and delete
323 // itself. 323 // itself.
324 popup_->Close(); 324 popup_->Close();
325 MessageLoop::current()->DeleteSoon(FROM_HERE, popup_); 325 base::MessageLoop::current()->DeleteSoon(FROM_HERE, popup_);
326 } 326 }
327 327
328 void FullscreenExitBubbleViews::UpdateContent( 328 void FullscreenExitBubbleViews::UpdateContent(
329 const GURL& url, 329 const GURL& url,
330 FullscreenExitBubbleType bubble_type) { 330 FullscreenExitBubbleType bubble_type) {
331 DCHECK_NE(FEB_TYPE_NONE, bubble_type); 331 DCHECK_NE(FEB_TYPE_NONE, bubble_type);
332 if (bubble_type_ == bubble_type && url_ == url) 332 if (bubble_type_ == bubble_type && url_ == url)
333 return; 333 return;
334 334
335 url_ = url; 335 url_ = url;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 const content::NotificationDetails& details) { 514 const content::NotificationDetails& details) {
515 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); 515 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type);
516 UpdateForImmersiveState(); 516 UpdateForImmersiveState();
517 } 517 }
518 518
519 void FullscreenExitBubbleViews::OnWidgetVisibilityChanged( 519 void FullscreenExitBubbleViews::OnWidgetVisibilityChanged(
520 views::Widget* widget, 520 views::Widget* widget,
521 bool visible) { 521 bool visible) {
522 UpdateMouseWatcher(); 522 UpdateMouseWatcher();
523 } 523 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/importer/import_lock_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698