1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_RESIZING_MODE_SELECTOR_H_
6 #define CONTENT_RENDERER_RESIZING_MODE_SELECTOR_H_
8 #include "base/basictypes.h"
10 struct ViewMsg_Resize_Params
;
16 // Enables switching between two modes of resizing:
17 // 1) The "normal" (asynchronous) resizing, which involves sending messages to
18 // and receiving them from host; and
19 // 2) The synchronous mode, which short-circuits the resizing logic to operate
20 // strictly inside renderer.
21 // The latter is necessary to support a handful of layout tests that were
22 // written with the expectation of a synchronous resize, and we're going to
23 // eventually rewrite or remove all of them. See http://crbug.com/309760 for
25 class ResizingModeSelector
{
27 ResizingModeSelector();
29 bool ShouldAbortOnResize(RenderWidget
* widget
,
30 const ViewMsg_Resize_Params
& params
);
32 void set_is_synchronous_mode(bool mode
);
33 bool is_synchronous_mode() const;
36 bool is_synchronous_mode_
;
38 DISALLOW_COPY_AND_ASSIGN(ResizingModeSelector
);
41 } // namespace content
43 #endif // CONTENT_RENDERER_RESIZING_MODE_SELECTOR_H_