Fixing an off by one error in screenshot manager code.
[chromium-blink-merge.git] / ui / web_dialogs / test / test_web_dialog_delegate.h
blob18a73b2558d328f8fffd2adcdcb862df618711d5
1 // Copyright (c) 2012 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 UI_WEB_DIALOGS_TEST_TEST_WEB_DIALOG_DELEGATE_H_
6 #define UI_WEB_DIALOGS_TEST_TEST_WEB_DIALOG_DELEGATE_H_
8 #include <string>
10 #include "base/compiler_specific.h"
11 #include "ui/gfx/size.h"
12 #include "ui/web_dialogs/web_dialog_delegate.h"
13 #include "url/gurl.h"
15 namespace ui {
16 namespace test {
18 class TestWebDialogDelegate : public WebDialogDelegate {
19 public:
20 explicit TestWebDialogDelegate(const GURL& url);
21 virtual ~TestWebDialogDelegate();
23 void set_size(int width, int height) {
24 size_.SetSize(width, height);
27 // WebDialogDelegate implementation:
28 virtual ModalType GetDialogModalType() const OVERRIDE;
29 virtual base::string16 GetDialogTitle() const OVERRIDE;
30 virtual GURL GetDialogContentURL() const OVERRIDE;
31 virtual void GetWebUIMessageHandlers(
32 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
33 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
34 virtual std::string GetDialogArgs() const OVERRIDE;
35 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
36 virtual void OnCloseContents(content::WebContents* source,
37 bool* out_close_dialog) OVERRIDE;
38 virtual bool ShouldShowDialogTitle() const OVERRIDE;
40 protected:
41 const GURL url_;
42 gfx::Size size_;
44 DISALLOW_COPY_AND_ASSIGN(TestWebDialogDelegate);
47 } // namespace test
48 } // namespace ui
50 #endif // UI_WEB_DIALOGS_TEST_TEST_WEB_DIALOG_DELEGATE_H_