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

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

Issue 10448066: Move the web dialogs code to src/ui/web_dialogs from src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 months 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_TEST_WEB_DIALOG_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_TEST_WEB_DIALOG_DELEGATE_H_
6 #define CHROME_BROWSER_UI_WEBUI_TEST_WEB_DIALOG_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_TEST_WEB_DIALOG_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/ui/webui/web_dialog_delegate.h"
13 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
14 #include "ui/gfx/size.h" 13 #include "ui/gfx/size.h"
14 #include "ui/web_dialogs/web_dialog_delegate.h"
15 15
16 namespace test { 16 namespace test {
17 17
18 class TestWebDialogDelegate : public WebDialogDelegate { 18 class TestWebDialogDelegate : public ui::WebDialogDelegate {
19 public: 19 public:
20 explicit TestWebDialogDelegate(const GURL& url); 20 explicit TestWebDialogDelegate(const GURL& url);
21 virtual ~TestWebDialogDelegate(); 21 virtual ~TestWebDialogDelegate();
22 22
23 void set_size(int width, int height) { 23 void set_size(int width, int height) {
24 size_.SetSize(width, height); 24 size_.SetSize(width, height);
25 } 25 }
26 26
27 // WebDialogDelegate implementation: 27 // ui::WebDialogDelegate implementation:
28 virtual ui::ModalType GetDialogModalType() const OVERRIDE; 28 virtual ui::ModalType GetDialogModalType() const OVERRIDE;
29 virtual string16 GetDialogTitle() const OVERRIDE; 29 virtual string16 GetDialogTitle() const OVERRIDE;
30 virtual GURL GetDialogContentURL() const OVERRIDE; 30 virtual GURL GetDialogContentURL() const OVERRIDE;
31 virtual void GetWebUIMessageHandlers( 31 virtual void GetWebUIMessageHandlers(
32 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; 32 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
33 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; 33 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
34 virtual std::string GetDialogArgs() const OVERRIDE; 34 virtual std::string GetDialogArgs() const OVERRIDE;
35 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; 35 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
36 virtual void OnCloseContents(content::WebContents* source, 36 virtual void OnCloseContents(content::WebContents* source,
37 bool* out_close_dialog) OVERRIDE; 37 bool* out_close_dialog) OVERRIDE;
38 virtual bool ShouldShowDialogTitle() const OVERRIDE; 38 virtual bool ShouldShowDialogTitle() const OVERRIDE;
39 39
40 protected: 40 protected:
41 const GURL url_; 41 const GURL url_;
42 gfx::Size size_; 42 gfx::Size size_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(TestWebDialogDelegate); 44 DISALLOW_COPY_AND_ASSIGN(TestWebDialogDelegate);
45 }; 45 };
46 46
47 } // namespace test 47 } // namespace test
48 48
49 #endif // CHROME_BROWSER_UI_WEBUI_TEST_WEB_DIALOG_DELEGATE_H_ 49 #endif // CHROME_BROWSER_UI_WEBUI_TEST_WEB_DIALOG_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/task_manager/task_manager_dialog.cc ('k') | chrome/browser/ui/webui/web_dialog_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698