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

Unified Diff: ui/base/window_resize_helper.h

Issue 1513053002: WIP - Gutterless resize on Windows Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 5 years 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
Index: ui/base/window_resize_helper.h
diff --git a/ui/accelerated_widget_mac/window_resize_helper_mac.h b/ui/base/window_resize_helper.h
similarity index 79%
rename from ui/accelerated_widget_mac/window_resize_helper_mac.h
rename to ui/base/window_resize_helper.h
index f81cdc485444d4abebb87d966a277fe22cd52d17..f9edc4d40fbc76487cd823262866bd2c03c6503b 100644
--- a/ui/accelerated_widget_mac/window_resize_helper_mac.h
+++ b/ui/base/window_resize_helper.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_ACCELERATED_WIDGET_MAC_WINDOW_RESIZE_HELPER_MAC_H_
-#define UI_ACCELERATED_WIDGET_MAC_WINDOW_RESIZE_HELPER_MAC_H_
+#ifndef UI_BASE_WINDOW_RESIZE_HELPER_H_
+#define UI_BASE_WINDOW_RESIZE_HELPER_H_
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "ui/accelerated_widget_mac/accelerated_widget_mac_export.h"
+#include "ui/base/ui_base_export.h"
namespace base {
class SingleThreadTaskRunner;
@@ -18,13 +18,13 @@ class WaitableEvent;
namespace ui {
-// WindowResizeHelperMac is used to make resize appear smooth. That is to
+// WindowResizeHelper is used to make resize appear smooth. That is to
// say, make sure that the window size and the size of the contents being drawn
// in that window are resized in lock-step. This is accomplished by waiting
// inside AppKit drawing routines on the UI thread for the compositor to produce
// a frame of same size as the NSView that hosts an AcceleratedWidgetMac. When a
// resize occurs, the view controller can wait for a frame of the correct size
-// by calling WindowResizeHelperMac::WaitForSingleTaskToRun() until a timeout
+// by calling WindowResizeHelper::WaitForSingleTaskToRun() until a timeout
// occurs, or the corresponding AcceleratedWidgetMac has a renderer frame of the
// same size as its NSView.
//
@@ -39,13 +39,13 @@ namespace ui {
//
// This is further complicated because, in order for a frame to appear, it is
// also necessary to run tasks posted by the ui::Compositor. To accomplish this,
-// the task_runner() that WindowResizeHelperMac provides can be used to
+// the task_runner() that WindowResizeHelper provides can be used to
// construct a ui::Compositor. When the Compositor posts tasks to it, they are
// enqueued in the aforementioned queue, which may be pumped by
-// WindowResizeHelperMac::WaitForSingleTaskToRun().
-class ACCELERATED_WIDGET_MAC_EXPORT WindowResizeHelperMac {
+// WindowResizeHelper::WaitForSingleTaskToRun().
+class UI_BASE_EXPORT WindowResizeHelper {
public:
- static WindowResizeHelperMac* Get();
+ static WindowResizeHelper* Get();
// Initializes the pumpable task_runner(), providing it with the task runner
// for UI thread tasks. task_runner() will be null before Init() is called,
@@ -62,9 +62,9 @@ class ACCELERATED_WIDGET_MAC_EXPORT WindowResizeHelperMac {
bool WaitForSingleTaskToRun(const base::TimeDelta& max_delay);
private:
- friend struct base::DefaultLazyInstanceTraits<WindowResizeHelperMac>;
- WindowResizeHelperMac();
- ~WindowResizeHelperMac();
+ friend struct base::DefaultLazyInstanceTraits<WindowResizeHelper>;
+ WindowResizeHelper();
+ ~WindowResizeHelper();
// This helper is needed to create a ScopedAllowWait inside the scope of a
// class where it is allowed.
@@ -74,9 +74,9 @@ class ACCELERATED_WIDGET_MAC_EXPORT WindowResizeHelperMac {
// the task queue and does the actual work for WaitForSingleTaskToRun.
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
- DISALLOW_COPY_AND_ASSIGN(WindowResizeHelperMac);
+ DISALLOW_COPY_AND_ASSIGN(WindowResizeHelper);
};
} // namespace ui
-#endif // UI_ACCELERATED_WIDGET_MAC_WINDOW_RESIZE_HELPER_MAC_H_
+#endif // UI_BASE_WINDOW_RESIZE_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698