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

Unified Diff: chrome/browser/ui_thread_helpers.h

Issue 3183013: [Mac] Don't close the Wrench menu after using the zoom buttons if the menu was opened sticky. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: nits Created 10 years, 4 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 | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | chrome/browser/ui_thread_helpers_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui_thread_helpers.h
diff --git a/chrome/browser/ui_thread_helpers.h b/chrome/browser/ui_thread_helpers.h
new file mode 100644
index 0000000000000000000000000000000000000000..90e2c4e32156028c746da88d9a081929d6e2ee51
--- /dev/null
+++ b/chrome/browser/ui_thread_helpers.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_THREAD_HELPERS_H_
+#define CHROME_BROWSER_UI_THREAD_HELPERS_H_
+#pragma once
+
+class Task;
+
+namespace tracked_objects {
+class Location;
+} // namespace tracked_objects
+
+namespace ui_thread_helpers {
+
+// This can be used in place of ChromeThread::PostTask(ChromeThread::UI, ...).
+// The purpose of this function is to be able to execute Chrome work alongside
+// native work when a message loop is running nested or, in the case of Mac,
+// in a different mode. Currently this is used for updating the HostZoomMap
+// while the Wrench menu is open, allowing for the zoom display to update. See
+// http://crbug.com/48679 for the full rationale.
+//
+// CAVEAT EMPTOR: This function's implementation is different across platforms
+// and may run the Task in a way that differs from the stock MessageLoop. You
+// should check the behavior on all platforms if you use this.
+bool PostTaskWhileRunningMenu(const tracked_objects::Location& from_here,
+ Task* task);
+
+} // namespace ui_thread_helpers
+
+#endif // CHROME_BROWSER_UI_THREAD_HELPERS_H_
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | chrome/browser/ui_thread_helpers_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698