Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(616)

Side by Side Diff: chrome/browser/ui/webui/test_html_dialog_ui_delegate.h

Issue 8417005: Share TabFirstRenderWatcher with HtmlDialogView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 namespace test {
16
17 class TestHtmlDialogUIDelegate : public HtmlDialogUIDelegate {
18 public:
19 explicit TestHtmlDialogUIDelegate(const GURL& url);
20 virtual ~TestHtmlDialogUIDelegate();
21
22 void set_size(int width, int height) {
23 size_.SetSize(width, height);
24 }
25
26 // HTMLDialogUIDelegate implementation:
27 virtual bool IsDialogModal() const OVERRIDE;
28 virtual string16 GetDialogTitle() const OVERRIDE;
29 virtual GURL GetDialogContentURL() const OVERRIDE;
30 virtual void GetWebUIMessageHandlers(
31 std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE;
32 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
33 virtual std::string GetDialogArgs() const OVERRIDE;
34 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
35 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog)
36 OVERRIDE;
37 virtual bool ShouldShowDialogTitle() const OVERRIDE;
38
39 protected:
40 const GURL url_;
41 gfx::Size size_;
42
43 DISALLOW_COPY_AND_ASSIGN(TestHtmlDialogUIDelegate);
44 };
45
46 } // namespace test
47
48 #endif // CHROME_BROWSER_UI_WEBUI_TEST_HTML_DIALOG_UI_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/constrained_html_ui_browsertest.cc ('k') | chrome/browser/ui/webui/test_html_dialog_ui_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698