Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_TEST_HTML_DIALOG_UI_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_TEST_HTML_DIALOG_UI_DELEGATE_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/compiler_specific.h" | |
| 12 #include "chrome/browser/ui/webui/html_dialog_ui.h" | |
| 13 #include "ui/gfx/size.h" | |
| 14 | |
| 15 class TestHtmlDialogUIDelegate : public HtmlDialogUIDelegate { | |
|
oshima
2011/11/01 18:28:27
put this in test namespace. (it's getting common p
xiyuan
2011/11/01 20:18:15
Done.
| |
| 16 public: | |
| 17 explicit TestHtmlDialogUIDelegate(const GURL& url); | |
| 18 virtual ~TestHtmlDialogUIDelegate(); | |
| 19 | |
| 20 void set_size(int width, int height) { | |
| 21 size_.SetSize(width, height); | |
| 22 } | |
| 23 | |
| 24 // HTMLDialogUIDelegate implementation: | |
| 25 virtual bool IsDialogModal() const OVERRIDE; | |
| 26 virtual string16 GetDialogTitle() const OVERRIDE; | |
| 27 virtual GURL GetDialogContentURL() const OVERRIDE; | |
| 28 virtual void GetWebUIMessageHandlers( | |
| 29 std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE {} | |
| 30 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | |
| 31 virtual std::string GetDialogArgs() const OVERRIDE; | |
| 32 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE {} | |
| 33 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) | |
| 34 OVERRIDE; | |
| 35 virtual bool ShouldShowDialogTitle() const OVERRIDE; | |
| 36 | |
| 37 protected: | |
| 38 GURL url_; | |
|
oshima
2011/11/01 18:28:27
const? (not sure)
xiyuan
2011/11/01 20:18:15
Done. Think it should be const as we are not suppo
| |
| 39 gfx::Size size_; | |
| 40 }; | |
| 41 | |
| 42 #endif // CHROME_BROWSER_UI_WEBUI_TEST_HTML_DIALOG_UI_DELEGATE_H_ | |
| OLD | NEW |