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

Side by Side Diff: chrome/browser/repost_form_warning_controller.h

Issue 8983010: Convert WebContents to return a content::NavigationController instead of the implementation. Upda... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 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 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_REPOST_FORM_WARNING_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_
6 #define CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ 6 #define CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" 10 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
11 11
12 namespace content {
12 class NavigationController; 13 class NavigationController;
14 }
13 15
14 // This class is used to continue or cancel a pending reload when the 16 // This class is used to continue or cancel a pending reload when the
15 // repost form warning is shown. It is owned by the platform-dependent 17 // repost form warning is shown. It is owned by the platform-dependent
16 // |RepostFormWarning{Gtk,Mac,View}| classes. 18 // |RepostFormWarning{Gtk,Mac,View}| classes.
17 class RepostFormWarningController : public TabModalConfirmDialogDelegate { 19 class RepostFormWarningController : public TabModalConfirmDialogDelegate {
18 public: 20 public:
19 explicit RepostFormWarningController(content::WebContents* web_contents); 21 explicit RepostFormWarningController(content::WebContents* web_contents);
20 virtual ~RepostFormWarningController(); 22 virtual ~RepostFormWarningController();
21 23
22 // TabModalConfirmDialogDelegate methods: 24 // TabModalConfirmDialogDelegate methods:
23 virtual string16 GetTitle() OVERRIDE; 25 virtual string16 GetTitle() OVERRIDE;
24 virtual string16 GetMessage() OVERRIDE; 26 virtual string16 GetMessage() OVERRIDE;
25 virtual string16 GetAcceptButtonTitle() OVERRIDE; 27 virtual string16 GetAcceptButtonTitle() OVERRIDE;
26 #if defined(TOOLKIT_USES_GTK) 28 #if defined(TOOLKIT_USES_GTK)
27 virtual const char* GetAcceptButtonIcon() OVERRIDE; 29 virtual const char* GetAcceptButtonIcon() OVERRIDE;
28 virtual const char* GetCancelButtonIcon() OVERRIDE; 30 virtual const char* GetCancelButtonIcon() OVERRIDE;
29 #endif // defined(TOOLKIT_USES_GTK) 31 #endif // defined(TOOLKIT_USES_GTK)
30 virtual void OnAccepted() OVERRIDE; 32 virtual void OnAccepted() OVERRIDE;
31 virtual void OnCanceled() OVERRIDE; 33 virtual void OnCanceled() OVERRIDE;
32 34
33 private: 35 private:
34 virtual void Observe(int type, 36 virtual void Observe(int type,
35 const content::NotificationSource& source, 37 const content::NotificationSource& source,
36 const content::NotificationDetails& details) OVERRIDE; 38 const content::NotificationDetails& details) OVERRIDE;
37 39
38 // Weak pointer; this dialog is cancelled when the WebContents is closed. 40 // Weak pointer; this dialog is cancelled when the WebContents is closed.
39 NavigationController* navigation_controller_; 41 content::NavigationController* navigation_controller_;
40 42
41 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController); 43 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController);
42 }; 44 };
43 45
44 #endif // CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_ 46 #endif // CHROME_BROWSER_REPOST_FORM_WARNING_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698