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

Side by Side Diff: chrome/browser/ui/gtk/extensions/extension_popup_gtk.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/gtk/extensions/extension_popup_gtk.h" 5 #include "chrome/browser/ui/gtk/extensions/extension_popup_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 if (attached) { 115 if (attached) {
116 // Make sure that the popup won't go away when the inspector is activated. 116 // Make sure that the popup won't go away when the inspector is activated.
117 if (bubble_) 117 if (bubble_)
118 bubble_->StopGrabbingInput(); 118 bubble_->StopGrabbingInput();
119 119
120 being_inspected_ = true; 120 being_inspected_ = true;
121 } else { 121 } else {
122 // If the devtools window is closing, we post a task to ourselves to 122 // If the devtools window is closing, we post a task to ourselves to
123 // close the popup. This gives the devtools window a chance to finish 123 // close the popup. This gives the devtools window a chance to finish
124 // detaching from the inspected RenderViewHost. 124 // detaching from the inspected RenderViewHost.
125 MessageLoop::current()->PostTask( 125 base::MessageLoop::current()->PostTask(
126 FROM_HERE, 126 FROM_HERE,
127 base::Bind(&ExtensionPopupGtk::DestroyPopupWithoutResult, 127 base::Bind(&ExtensionPopupGtk::DestroyPopupWithoutResult,
128 weak_factory_.GetWeakPtr())); 128 weak_factory_.GetWeakPtr()));
129 } 129 }
130 } 130 }
131 131
132 void ExtensionPopupGtk::BubbleClosing(BubbleGtk* bubble, 132 void ExtensionPopupGtk::BubbleClosing(BubbleGtk* bubble,
133 bool closed_by_escape) { 133 bool closed_by_escape) {
134 current_extension_popup_ = NULL; 134 current_extension_popup_ = NULL;
135 delete this; 135 delete this;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 void ExtensionPopupGtk::DestroyPopupWithoutResult() { 194 void ExtensionPopupGtk::DestroyPopupWithoutResult() {
195 DestroyPopup(); 195 DestroyPopup();
196 } 196 }
197 197
198 gfx::Rect ExtensionPopupGtk::GetViewBounds() { 198 gfx::Rect ExtensionPopupGtk::GetViewBounds() {
199 GtkAllocation allocation; 199 GtkAllocation allocation;
200 gtk_widget_get_allocation(host_->view()->native_view(), &allocation); 200 gtk_widget_get_allocation(host_->view()->native_view(), &allocation);
201 return gfx::Rect(allocation); 201 return gfx::Rect(allocation);
202 } 202 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc ('k') | chrome/browser/ui/gtk/first_run_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698