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

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

Issue 8983012: Get rid of content::NavigationController in cc file and use "using" instead. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 #include "chrome/browser/repost_form_warning_controller.h" 5 #include "chrome/browser/repost_form_warning_controller.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "content/public/browser/navigation_controller.h" 13 #include "content/public/browser/navigation_controller.h"
14 #include "content/public/browser/notification_source.h" 14 #include "content/public/browser/notification_source.h"
15 #include "content/public/browser/notification_types.h" 15 #include "content/public/browser/notification_types.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 #include "grit/generated_resources.h" 17 #include "grit/generated_resources.h"
18 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
19 19
20 using content::NavigationController;
20 using content::WebContents; 21 using content::WebContents;
21 22
22 RepostFormWarningController::RepostFormWarningController( 23 RepostFormWarningController::RepostFormWarningController(
23 WebContents* web_contents) 24 WebContents* web_contents)
24 : TabModalConfirmDialogDelegate(web_contents), 25 : TabModalConfirmDialogDelegate(web_contents),
25 navigation_controller_(&web_contents->GetController()) { 26 navigation_controller_(&web_contents->GetController()) {
26 registrar_.Add(this, content::NOTIFICATION_REPOST_WARNING_SHOWN, 27 registrar_.Add(this, content::NOTIFICATION_REPOST_WARNING_SHOWN,
27 content::Source<content::NavigationController>( 28 content::Source<NavigationController>(
28 navigation_controller_)); 29 navigation_controller_));
29 } 30 }
30 31
31 RepostFormWarningController::~RepostFormWarningController() { 32 RepostFormWarningController::~RepostFormWarningController() {
32 } 33 }
33 34
34 string16 RepostFormWarningController::GetTitle() { 35 string16 RepostFormWarningController::GetTitle() {
35 return l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING_TITLE); 36 return l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING_TITLE);
36 } 37 }
37 38
(...skipping 27 matching lines...) Expand all
65 int type, 66 int type,
66 const content::NotificationSource& source, 67 const content::NotificationSource& source,
67 const content::NotificationDetails& details) { 68 const content::NotificationDetails& details) {
68 // Close the dialog if we show an additional dialog, to avoid them 69 // Close the dialog if we show an additional dialog, to avoid them
69 // stacking up. 70 // stacking up.
70 if (type == content::NOTIFICATION_REPOST_WARNING_SHOWN) 71 if (type == content::NOTIFICATION_REPOST_WARNING_SHOWN)
71 Cancel(); 72 Cancel();
72 else 73 else
73 TabModalConfirmDialogDelegate::Observe(type, source, details); 74 TabModalConfirmDialogDelegate::Observe(type, source, details);
74 } 75 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_preview_tab_controller.cc ('k') | chrome/browser/safe_browsing/browser_feature_extractor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698