Add diagnostics_writer.cc to the list of files allowed to printf.
[chromium-blink-merge.git] / components / web_modal / test_web_contents_modal_dialog_host.h
blob89fb4b399c6c341e82a77e2499abc9953ea84a62
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 COMPONENTS_WEB_MODAL_TEST_WEB_CONTENTS_MODAL_DIALOG_HOST_H_
6 #define COMPONENTS_WEB_MODAL_TEST_WEB_CONTENTS_MODAL_DIALOG_HOST_H_
8 #include "components/web_modal/web_contents_modal_dialog_host.h"
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "ui/gfx/native_widget_types.h"
13 #include "ui/gfx/size.h"
15 namespace web_modal {
17 class TestWebContentsModalDialogHost : public WebContentsModalDialogHost {
18 public:
19 explicit TestWebContentsModalDialogHost(gfx::NativeView host_view);
20 virtual ~TestWebContentsModalDialogHost();
22 // WebContentsModalDialogHost:
23 virtual gfx::Size GetMaximumDialogSize() OVERRIDE;
24 virtual gfx::NativeView GetHostView() const OVERRIDE;
25 virtual gfx::Point GetDialogPosition(const gfx::Size& size) OVERRIDE;
26 virtual void AddObserver(ModalDialogHostObserver* observer) OVERRIDE;
27 virtual void RemoveObserver(ModalDialogHostObserver* observer) OVERRIDE;
29 void set_max_dialog_size(const gfx::Size& max_dialog_size) {
30 max_dialog_size_ = max_dialog_size;
33 private:
34 gfx::NativeView host_view_;
35 gfx::Size max_dialog_size_;
37 DISALLOW_COPY_AND_ASSIGN(TestWebContentsModalDialogHost);
40 } // namespace web_modal
42 #endif // COMPONENTS_WEB_MODAL_TEST_WEB_CONTENTS_MODAL_DIALOG_HOST_H_