summaryrefslogtreecommitdiffstats
path: root/content/renderer/resizing_mode_selector.h
diff options
context:
space:
mode:
authordglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 00:42:04 +0000
committerdglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 00:42:04 +0000
commit5b45ad46eafe1508df0bf2ce10e544e01cded7ce (patch)
tree6923f6c9b88e6c616dc381cb6e2feef01de6a014 /content/renderer/resizing_mode_selector.h
parent472522b6f4e3fcee5645b672015c031801a3ff19 (diff)
downloadchromium_src-5b45ad46eafe1508df0bf2ce10e544e01cded7ce.zip
chromium_src-5b45ad46eafe1508df0bf2ce10e544e01cded7ce.tar.gz
chromium_src-5b45ad46eafe1508df0bf2ce10e544e01cded7ce.tar.bz2
Plumb through useUnfortunateSynchronousResizeMode.
This is a second side of Blink's r160382. It adds capability to switch between normal resizing and the synchronous (the unfortunate) one. BUG=309760 R=jam, jochen Review URL: https://codereview.chromium.org/38463002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/resizing_mode_selector.h')
-rw-r--r--content/renderer/resizing_mode_selector.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/content/renderer/resizing_mode_selector.h b/content/renderer/resizing_mode_selector.h
new file mode 100644
index 0000000..67702fd
--- /dev/null
+++ b/content/renderer/resizing_mode_selector.h
@@ -0,0 +1,43 @@
+// Copyright 2013 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 CONTENT_RENDERER_RESIZING_MODE_SELECTOR_H_
+#define CONTENT_RENDERER_RESIZING_MODE_SELECTOR_H_
+
+#include "base/basictypes.h"
+
+struct ViewMsg_Resize_Params;
+
+namespace content {
+
+class RenderWidget;
+
+// Enables switching between two modes of resizing:
+// 1) The "normal" (asynchronous) resizing, which involves sending messages to
+// and receiving them from host; and
+// 2) The synchronous mode, which short-circuits the resizing logic to operate
+// strictly inside renderer.
+// The latter is necessary to support a handful of layout tests that were
+// written with the expectation of a synchronous resize, and we're going to
+// eventually rewrite or remove all of them. See http://crbug.com/309760 for
+// details.
+class ResizingModeSelector {
+ public:
+ ResizingModeSelector();
+
+ bool ShouldAbortOnResize(RenderWidget* widget,
+ const ViewMsg_Resize_Params& params);
+
+ void set_is_synchronous_mode(bool mode);
+ bool is_synchronous_mode() const;
+
+ private:
+ bool is_synchronous_mode_;
+
+ DISALLOW_COPY_AND_ASSIGN(ResizingModeSelector);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_RESIZING_MODE_SELECTOR_H_