summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser.scons12
-rw-r--r--chrome/browser/browser.vcproj40
-rw-r--r--chrome/browser/browser_process.h3
-rw-r--r--chrome/browser/plugin_process_host.h5
-rw-r--r--chrome/browser/plugin_service.cc2
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc2
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc2
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc (renamed from chrome/browser/resource_message_filter.cc)2
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h (renamed from chrome/browser/resource_message_filter.h)10
-rw-r--r--chrome/browser/renderer_host/resource_request_details.h (renamed from chrome/browser/resource_request_details.h)17
-rw-r--r--chrome/browser/ssl/ssl_manager.cc2
-rw-r--r--chrome/browser/tab_contents/navigation_controller.cc7
-rw-r--r--chrome/browser/tab_contents/repost_form_warning.h17
-rw-r--r--chrome/browser/task_manager_resource_providers.cc2
-rw-r--r--chrome/browser/views/browser_views.vcproj8
-rw-r--r--chrome/browser/views/repost_form_warning_view.cc (renamed from chrome/browser/repost_form_warning_dialog.cc)83
-rw-r--r--chrome/browser/views/repost_form_warning_view.h (renamed from chrome/browser/repost_form_warning_dialog.h)22
-rw-r--r--chrome/chrome.xcodeproj/project.pbxproj20
18 files changed, 131 insertions, 125 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index 337dcdf..653d211 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -127,9 +127,6 @@ input_files = ChromeFileList([
'profile.h',
'profile_manager.cc',
'profile_manager.h',
- 'resource_message_filter.cc',
- 'resource_message_filter.h',
- 'resource_request_details.h',
'session_startup_pref.cc',
'session_startup_pref.h',
'shell_dialogs.h',
@@ -193,8 +190,6 @@ input_files = ChromeFileList([
'login_prompt.cc',
'login_prompt.h',
'options_window.h',
- 'repost_form_warning_dialog.cc',
- 'repost_form_warning_dialog.h',
'task_manager.cc',
'task_manager.h',
'task_manager_resource_providers.cc',
@@ -544,6 +539,9 @@ input_files = ChromeFileList([
'renderer_host/resource_dispatcher_host.cc',
'renderer_host/resource_dispatcher_host.h',
'renderer_host/resource_handler.h',
+ 'renderer_host/resource_message_filter.cc',
+ 'renderer_host/resource_message_filter.h',
+ 'renderer_host/resource_request_details.h',
'renderer_host/safe_browsing_resource_handler.cc',
'renderer_host/safe_browsing_resource_handler.h',
'renderer_host/save_file_resource_handler.cc',
@@ -576,6 +574,7 @@ input_files = ChromeFileList([
'tab_contents/render_view_context_menu_controller.h',
'tab_contents/render_view_host_manager.cc',
'tab_contents/render_view_host_manager.h',
+ 'tab_contents/repost_form_warning.h',
'tab_contents/security_style.h',
'tab_contents/site_instance.cc',
'tab_contents/site_instance.h',
@@ -751,8 +750,7 @@ if not env.Bit('windows'):
'printing/printer_query.cc',
'printing/win_printing_context.cc',
'renderer_host/cross_site_resource_handler.cc',
- 'repost_form_warning_dialog.cc',
- 'resource_message_filter.cc',
+ 'renderer_host/resource_message_filter.cc',
'rlz/rlz.cc',
'safe_browsing/protocol_manager.cc',
'safe_browsing/safe_browsing_blocking_page.cc',
diff --git a/chrome/browser/browser.vcproj b/chrome/browser/browser.vcproj
index 1dd27d8..38536b9 100644
--- a/chrome/browser/browser.vcproj
+++ b/chrome/browser/browser.vcproj
@@ -490,18 +490,6 @@
>
</File>
<File
- RelativePath=".\resource_message_filter.cc"
- >
- </File>
- <File
- RelativePath=".\resource_message_filter.h"
- >
- </File>
- <File
- RelativePath=".\resource_request_details.h"
- >
- </File>
- <File
RelativePath=".\session_startup_pref.cc"
>
</File>
@@ -750,14 +738,6 @@
>
</File>
<File
- RelativePath=".\repost_form_warning_dialog.cc"
- >
- </File>
- <File
- RelativePath=".\repost_form_warning_dialog.h"
- >
- </File>
- <File
RelativePath=".\status_bubble.h"
>
</File>
@@ -986,11 +966,11 @@
>
</File>
<File
- RelativePath=".\history\history_publisher_win.cc"
+ RelativePath=".\history\history_publisher.h"
>
</File>
<File
- RelativePath=".\history\history_publisher.h"
+ RelativePath=".\history\history_publisher_win.cc"
>
</File>
<File
@@ -2070,6 +2050,18 @@
>
</File>
<File
+ RelativePath=".\renderer_host\resource_message_filter.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\renderer_host\resource_message_filter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\renderer_host\resource_request_details.h"
+ >
+ </File>
+ <File
RelativePath=".\renderer_host\safe_browsing_resource_handler.cc"
>
</File>
@@ -2186,6 +2178,10 @@
>
</File>
<File
+ RelativePath=".\tab_contents\repost_form_warning.h"
+ >
+ </File>
+ <File
RelativePath=".\tab_contents\security_style.h"
>
</File>
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
index b4f6a46..6eee7a7 100644
--- a/chrome/browser/browser_process.h
+++ b/chrome/browser/browser_process.h
@@ -90,7 +90,8 @@ class BrowserProcess {
// It might be nicer to have a thread pool for this kind of thing.
virtual base::Thread* file_thread() = 0;
- // Returns the thread that is used for database operations such as history.
+ // Returns the thread that is used for database operations such as the web
+ // database. History has its own thread since it has much higher traffic.
virtual base::Thread* db_thread() = 0;
virtual sandbox::BrokerServices* broker_services() = 0;
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index 21adb90..45eeaab 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -13,10 +13,9 @@
#include "base/process.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
-#include "chrome/browser/resource_message_filter.h"
-#include "chrome/common/ipc_channel_proxy.h"
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
-#include "chrome/browser/resource_message_filter.h"
+#include "chrome/browser/renderer_host/resource_message_filter.h"
+#include "chrome/common/ipc_channel_proxy.h"
class PluginService;
class PluginProcessHost;
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
index 032842c..aeec45b 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/plugin_process_host.h"
#include "chrome/browser/renderer_host/render_process_host.h"
-#include "chrome/browser/resource_message_filter.h"
+#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/common/chrome_plugin_lib.h"
#include "chrome/common/logging_chrome.h"
#include "webkit/glue/plugins/plugin_list.h"
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 32ee2fd..42f02c4c7 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -30,7 +30,7 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_widget_helper.h"
#include "chrome/browser/renderer_host/renderer_security_policy.h"
-#include "chrome/browser/resource_message_filter.h"
+#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/browser/visitedlink_master.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 8d12aac..586e823 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -16,10 +16,10 @@
#include "chrome/browser/renderer_host/buffered_resource_handler.h"
#include "chrome/browser/renderer_host/download_resource_handler.h"
#include "chrome/browser/renderer_host/renderer_security_policy.h"
+#include "chrome/browser/renderer_host/resource_request_details.h"
#include "chrome/browser/renderer_host/safe_browsing_resource_handler.h"
#include "chrome/browser/renderer_host/save_file_resource_handler.h"
#include "chrome/browser/renderer_host/sync_resource_handler.h"
-#include "chrome/browser/resource_request_details.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/common/notification_service.h"
diff --git a/chrome/browser/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index 8d404c5..15b3f28 100644
--- a/chrome/browser/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/resource_message_filter.h"
+#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "base/clipboard.h"
#include "base/gfx/native_widget_types.h"
diff --git a/chrome/browser/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h
index 6b2db32..cd07729 100644
--- a/chrome/browser/resource_message_filter.h
+++ b/chrome/browser/renderer_host/resource_message_filter.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_RENDERER_RESOURCE_MSG_FILTER_H_
-#define CHROME_BROWSER_RENDERER_RESOURCE_MSG_FILTER_H_
+#ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_MSG_FILTER_H_
+#define CHROME_BROWSER_RENDERER_HOST_RESOURCE_MSG_FILTER_H_
#include "base/clipboard.h"
#include "base/file_path.h"
@@ -12,7 +12,6 @@
#include "base/ref_counted.h"
#include "build/build_config.h"
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
-#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/common/ipc_channel_proxy.h"
#include "chrome/common/modal_dialog_event.h"
#include "chrome/common/notification_observer.h"
@@ -20,7 +19,9 @@
#if defined(OS_WIN)
#include <windows.h>
+#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#else
+// TODO(port): port ResourceDispatcherHost.
#include "chrome/common/temp_scaffolding_stubs.h"
#endif
@@ -28,7 +29,6 @@ class ClipboardService;
class Profile;
class RenderWidgetHelper;
class SpellChecker;
-struct ViewHostMsg_Resource_Request;
struct WebPluginInfo;
namespace printing {
@@ -242,4 +242,4 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter,
DISALLOW_COPY_AND_ASSIGN(ResourceMessageFilter);
};
-#endif // CHROME_BROWSER_RENDERER_RESOURCE_MSG_FILTER_H_
+#endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_MSG_FILTER_H_
diff --git a/chrome/browser/resource_request_details.h b/chrome/browser/renderer_host/resource_request_details.h
index d8cd0cc..db5ac89 100644
--- a/chrome/browser/resource_request_details.h
+++ b/chrome/browser/renderer_host/resource_request_details.h
@@ -6,24 +6,18 @@
// resource request. It copies many of the publicly accessible member variables
// of URLRequest, but exists on the UI thread.
-#ifndef CHROME_BROWSER_RESOURCE_REQUEST_DETAILS_H__
-#define CHROME_BROWSER_RESOURCE_REQUEST_DETAILS_H__
+#ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_
+#define CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_
#include <string>
#include "base/basictypes.h"
+#include "chrome/browser/cert_store.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_status.h"
-#if defined(OS_WIN)
-// TODO(port): Move header to the above section when CertStore has been ported.
-#include "chrome/browser/cert_store.h"
-#elif defined(OS_POSIX)
-#include "chrome/common/temp_scaffolding_stubs.h"
-#endif
-
// Details about a resource request notification.
class ResourceRequestDetails {
public:
@@ -70,7 +64,7 @@ class ResourceRequestDetails {
int ssl_cert_status_;
ResourceType::Type resource_type_;
- DISALLOW_EVIL_CONSTRUCTORS(ResourceRequestDetails);
+ DISALLOW_COPY_AND_ASSIGN(ResourceRequestDetails);
};
// Details about a redirection of a resource request.
@@ -89,5 +83,4 @@ class ResourceRedirectDetails : public ResourceRequestDetails {
GURL new_url_;
};
-#endif // CHROME_BROWSER_RESOURCE_REQUEST_DETAILS_H__
-
+#endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc
index 99440b9..e92247b 100644
--- a/chrome/browser/ssl/ssl_manager.cc
+++ b/chrome/browser/ssl/ssl_manager.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/load_notification_details.h"
#include "chrome/browser/load_from_memory_cache_details.h"
#include "chrome/browser/renderer_host/render_view_host.h"
-#include "chrome/browser/resource_request_details.h"
+#include "chrome/browser/renderer_host/resource_request_details.h"
#include "chrome/browser/ssl/ssl_error_info.h"
#include "chrome/browser/ssl/ssl_policy.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"
diff --git a/chrome/browser/tab_contents/navigation_controller.cc b/chrome/browser/tab_contents/navigation_controller.cc
index 1e567f1..6b94764 100644
--- a/chrome/browser/tab_contents/navigation_controller.cc
+++ b/chrome/browser/tab_contents/navigation_controller.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/dom_ui/dom_ui_host.h"
#include "chrome/browser/sessions/session_types.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
+#include "chrome/browser/tab_contents/repost_form_warning.h"
#include "chrome/browser/tab_contents/site_instance.h"
#include "chrome/common/navigation_types.h"
#include "chrome/common/notification_service.h"
@@ -216,10 +217,10 @@ void NavigationController::Reload(bool check_for_repost) {
if (check_for_repost_ && check_for_repost && current_index != -1 &&
GetEntryAtIndex(current_index)->has_post_data()) {
// The user is asking to reload a page with POST data. Prompt to make sure
- // they really want to do this. If they do, RepostFormWarningDialog calls us
- // back with ReloadDontCheckForRepost.
+ // they really want to do this. If they do, the dialog will call us back
+ // with check_for_repost = false.
active_contents_->Activate();
- RepostFormWarningDialog::RunRepostFormWarningDialog(this);
+ RunRepostFormWarningDialog(this);
} else {
// Base the navigation on where we are now...
int current_index = GetCurrentEntryIndex();
diff --git a/chrome/browser/tab_contents/repost_form_warning.h b/chrome/browser/tab_contents/repost_form_warning.h
new file mode 100644
index 0000000..33588dc
--- /dev/null
+++ b/chrome/browser/tab_contents/repost_form_warning.h
@@ -0,0 +1,17 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_
+#define CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_
+
+class NavigationController;
+
+// Runs the form repost warning dialog. If the user accepts the action, then
+// it will call Reload on the navigation controller back with check_for_repost
+// set to false.
+//
+// This function is implemented by the platform-specific frontend.
+void RunRepostFormWarningDialog(NavigationController* nav_controller);
+
+#endif // CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_
diff --git a/chrome/browser/task_manager_resource_providers.cc b/chrome/browser/task_manager_resource_providers.cc
index c0e94c9..ceb48cc 100644
--- a/chrome/browser/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager_resource_providers.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/plugin_process_host.h"
#include "chrome/browser/plugin_service.h"
#include "chrome/browser/renderer_host/render_process_host.h"
-#include "chrome/browser/resource_message_filter.h"
+#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/common/notification_service.h"
diff --git a/chrome/browser/views/browser_views.vcproj b/chrome/browser/views/browser_views.vcproj
index 3a85578..265a745 100644
--- a/chrome/browser/views/browser_views.vcproj
+++ b/chrome/browser/views/browser_views.vcproj
@@ -698,6 +698,14 @@
>
</File>
<File
+ RelativePath=".\repost_form_warning_view.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\repost_form_warning_view.h"
+ >
+ </File>
+ <File
RelativePath=".\restart_message_box.cc"
>
</File>
diff --git a/chrome/browser/repost_form_warning_dialog.cc b/chrome/browser/views/repost_form_warning_view.cc
index 898c6c5..87d90c9 100644
--- a/chrome/browser/repost_form_warning_dialog.cc
+++ b/chrome/browser/views/repost_form_warning_view.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/repost_form_warning_dialog.h"
+#include "chrome/browser/views/repost_form_warning_view.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
@@ -13,17 +13,36 @@
#include "generated_resources.h"
-///////////////////////////////////////////////////////////////////////////////
-// RepostFormWarningDialog, public:
+// Implementation of function declared in
+// browser/tab_contents/repost_form_warning.h
+void RunRepostFormWarningDialog(NavigationController* navigation_controller) {
+ RepostFormWarningView* dialog =
+ new RepostFormWarningView(navigation_controller);
+}
-// static
-void RepostFormWarningDialog::RunRepostFormWarningDialog(
- NavigationController* navigation_controller) {
- RepostFormWarningDialog* dialog =
- new RepostFormWarningDialog(navigation_controller);
+RepostFormWarningView::RepostFormWarningView(
+ NavigationController* navigation_controller)
+ : navigation_controller_(navigation_controller),
+ message_box_view_(NULL) {
+ message_box_view_ = new MessageBoxView(
+ MessageBoxView::kIsConfirmMessageBox,
+ l10n_util::GetString(IDS_HTTP_POST_WARNING),
+ L"");
+ // TODO(beng): fix this - this dialog box should be shown by a method on the
+ // Browser.
+ HWND root_hwnd = NULL;
+ if (BrowserList::GetLastActive()) {
+ root_hwnd = reinterpret_cast<HWND>(BrowserList::GetLastActive()->
+ window()->GetNativeHandle());
+ }
+ views::Window::CreateChromeWindow(root_hwnd, gfx::Rect(), this)->Show();
+ NotificationService::current()->AddObserver(
+ this, NotificationType::LOAD_START, NotificationService::AllSources());
+ NotificationService::current()->AddObserver(
+ this, NotificationType::TAB_CLOSING, NotificationService::AllSources());
}
-RepostFormWarningDialog::~RepostFormWarningDialog() {
+RepostFormWarningView::~RepostFormWarningView() {
NotificationService::current()->RemoveObserver(
this, NotificationType::LOAD_START, NotificationService::AllSources());
NotificationService::current()->RemoveObserver(
@@ -31,13 +50,13 @@ RepostFormWarningDialog::~RepostFormWarningDialog() {
}
//////////////////////////////////////////////////////////////////////////////
-// RepostFormWarningDialog, views::DialogDelegate implementation:
+// RepostFormWarningView, views::DialogDelegate implementation:
-std::wstring RepostFormWarningDialog::GetWindowTitle() const {
+std::wstring RepostFormWarningView::GetWindowTitle() const {
return l10n_util::GetString(IDS_HTTP_POST_WARNING_TITLE);
}
-std::wstring RepostFormWarningDialog::GetDialogButtonLabel(
+std::wstring RepostFormWarningView::GetDialogButtonLabel(
DialogButton button) const {
if (button == DialogDelegate::DIALOGBUTTON_OK)
return l10n_util::GetString(IDS_HTTP_POST_WARNING_RESEND);
@@ -46,55 +65,33 @@ std::wstring RepostFormWarningDialog::GetDialogButtonLabel(
return L"";
}
-void RepostFormWarningDialog::WindowClosing() {
+void RepostFormWarningView::WindowClosing() {
delete this;
}
-bool RepostFormWarningDialog::Cancel() {
+bool RepostFormWarningView::Cancel() {
return true;
}
-bool RepostFormWarningDialog::Accept() {
+bool RepostFormWarningView::Accept() {
if (navigation_controller_)
navigation_controller_->Reload(false);
return true;
}
///////////////////////////////////////////////////////////////////////////////
-// RepostFormWarningDialog, views::WindowDelegate implementation:
+// RepostFormWarningView, views::WindowDelegate implementation:
-views::View* RepostFormWarningDialog::GetContentsView() {
+views::View* RepostFormWarningView::GetContentsView() {
return message_box_view_;
}
///////////////////////////////////////////////////////////////////////////////
-// RepostFormWarningDialog, private:
-
-RepostFormWarningDialog::RepostFormWarningDialog(
- NavigationController* navigation_controller)
- : navigation_controller_(navigation_controller),
- message_box_view_(NULL) {
- message_box_view_ = new MessageBoxView(
- MessageBoxView::kIsConfirmMessageBox,
- l10n_util::GetString(IDS_HTTP_POST_WARNING),
- L"");
- // TODO(beng): fix this - this dialog box should be shown by a method on the
- // Browser.
- HWND root_hwnd = NULL;
- if (BrowserList::GetLastActive()) {
- root_hwnd = reinterpret_cast<HWND>(BrowserList::GetLastActive()->
- window()->GetNativeHandle());
- }
- views::Window::CreateChromeWindow(root_hwnd, gfx::Rect(), this)->Show();
- NotificationService::current()->AddObserver(
- this, NotificationType::LOAD_START, NotificationService::AllSources());
- NotificationService::current()->AddObserver(
- this, NotificationType::TAB_CLOSING, NotificationService::AllSources());
-}
+// RepostFormWarningView, private:
-void RepostFormWarningDialog::Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void RepostFormWarningView::Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) {
// Close the dialog if we load a page (because reloading might not apply to
// the same page anymore) or if the tab is closed, because then we won't have
// a navigation controller anymore.
diff --git a/chrome/browser/repost_form_warning_dialog.h b/chrome/browser/views/repost_form_warning_view.h
index 3e41f63..db8f76b 100644
--- a/chrome/browser/repost_form_warning_dialog.h
+++ b/chrome/browser/views/repost_form_warning_view.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_REPOST_FORM_WARNING_H_
-#define CHROME_BROWSER_REPOST_FORM_WARNING_H_
+#ifndef CHROME_BROWSER_VIEWS_REPOST_FORM_WARNING_VIEW_H_
+#define CHROME_BROWSER_VIEWS_REPOST_FORM_WARNING_VIEW_H_
#include "chrome/common/notification_observer.h"
#include "chrome/views/dialog_delegate.h"
@@ -14,14 +14,12 @@ namespace views {
class Window;
}
-class RepostFormWarningDialog : public views::DialogDelegate,
- public NotificationObserver {
+class RepostFormWarningView : public views::DialogDelegate,
+ public NotificationObserver {
public:
- // Creates and runs a message box which asks the user if they want to resend
- // an HTTP POST.
- static void RunRepostFormWarningDialog(
- NavigationController* navigation_controller);
- virtual ~RepostFormWarningDialog();
+ // Use RunRepostFormWarningDialog (declared in repost_form_warning.h) to use.
+ RepostFormWarningView(NavigationController* navigation_controller);
+ virtual ~RepostFormWarningView();
// views::DialogDelegate Methods:
virtual std::wstring GetWindowTitle() const;
@@ -35,8 +33,6 @@ class RepostFormWarningDialog : public views::DialogDelegate,
virtual views::View* GetContentsView();
private:
- // Use RunRepostFormWarningDialog to use.
- RepostFormWarningDialog(NavigationController* navigation_controller);
// NotificationObserver implementation.
// Watch for a new load or a closed tab and dismiss the dialog if they occur.
@@ -50,7 +46,7 @@ class RepostFormWarningDialog : public views::DialogDelegate,
// Navigation controller, used to continue the reload.
NavigationController* navigation_controller_;
- DISALLOW_COPY_AND_ASSIGN(RepostFormWarningDialog);
+ DISALLOW_COPY_AND_ASSIGN(RepostFormWarningView);
};
-#endif // CHROME_BROWSER_REPOST_FORM_WARNING_H_
+#endif // CHROME_BROWSER_VIEWS_REPOST_FORM_WARNING_VIEW_H_
diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj
index 47f2842..2740444 100644
--- a/chrome/chrome.xcodeproj/project.pbxproj
+++ b/chrome/chrome.xcodeproj/project.pbxproj
@@ -242,6 +242,7 @@
A76E43A40F29039C009A7E88 /* browser_render_process_host.cc in Sources */ = {isa = PBXBuildFile; fileRef = A76E43A30F29039C009A7E88 /* browser_render_process_host.cc */; };
A7A20BF20F3A16DC00F62B4D /* render_widget.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D640CD50EAE868600EBCFC0 /* render_widget.cc */; };
A7A20E650F3A1E1C00F62B4D /* render_view.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D640CD30EAE868600EBCFC0 /* render_view.cc */; };
+ A7A211750F3A248300F62B4D /* resource_message_filter.cc in Sources */ = {isa = PBXBuildFile; fileRef = A7A211730F3A248300F62B4D /* resource_message_filter.cc */; };
A7C612990F30D63D008CEE5D /* render_process_host.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16EC10F2144D500861FAC /* render_process_host.cc */; };
A7C613C10F30D7E4008CEE5D /* mock_render_process_host.cc in Sources */ = {isa = PBXBuildFile; fileRef = A7C613BF0F30D7E4008CEE5D /* mock_render_process_host.cc */; };
A7C6146F0F30DA1D008CEE5D /* ipc_test_sink.cc in Sources */ = {isa = PBXBuildFile; fileRef = A7C6146D0F30DA1D008CEE5D /* ipc_test_sink.cc */; };
@@ -1502,11 +1503,6 @@
4D7BF8E40E9D4839009A6919 /* profile_manager.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = profile_manager.cc; sourceTree = "<group>"; };
4D7BF8E50E9D4839009A6919 /* profile_manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = profile_manager.h; sourceTree = "<group>"; };
4D7BF8E60E9D4839009A6919 /* profile_manager_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = profile_manager_unittest.cc; sourceTree = "<group>"; };
- 4D7BF8FE0E9D4839009A6919 /* repost_form_warning_dialog.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = repost_form_warning_dialog.cc; sourceTree = "<group>"; };
- 4D7BF8FF0E9D4839009A6919 /* repost_form_warning_dialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = repost_form_warning_dialog.h; sourceTree = "<group>"; };
- 4D7BF9040E9D4839009A6919 /* resource_message_filter.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = resource_message_filter.cc; sourceTree = "<group>"; };
- 4D7BF9050E9D4839009A6919 /* resource_message_filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resource_message_filter.h; sourceTree = "<group>"; };
- 4D7BF9060E9D4839009A6919 /* resource_request_details.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resource_request_details.h; sourceTree = "<group>"; };
4D7BF9070E9D4839009A6919 /* sandbox_policy.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sandbox_policy.cc; sourceTree = "<group>"; };
4D7BF9080E9D4839009A6919 /* sandbox_policy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sandbox_policy.h; sourceTree = "<group>"; };
4D7BF9090E9D4839009A6919 /* sanity_uitest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sanity_uitest.cc; sourceTree = "<group>"; };
@@ -1912,6 +1908,10 @@
A76E42AE0F28EDB5009A7E88 /* render_view_host_manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = render_view_host_manager.h; path = tab_contents/render_view_host_manager.h; sourceTree = "<group>"; };
A76E43970F29022A009A7E88 /* browser_render_process_host.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = browser_render_process_host.h; path = renderer_host/browser_render_process_host.h; sourceTree = "<group>"; };
A76E43A30F29039C009A7E88 /* browser_render_process_host.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = browser_render_process_host.cc; path = renderer_host/browser_render_process_host.cc; sourceTree = "<group>"; };
+ A7A211730F3A248300F62B4D /* resource_message_filter.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = resource_message_filter.cc; path = renderer_host/resource_message_filter.cc; sourceTree = "<group>"; };
+ A7A211740F3A248300F62B4D /* resource_message_filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = resource_message_filter.h; path = renderer_host/resource_message_filter.h; sourceTree = "<group>"; };
+ A7A211830F3A254F00F62B4D /* resource_request_details.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = resource_request_details.h; path = renderer_host/resource_request_details.h; sourceTree = "<group>"; };
+ A7A212AF0F3A698200F62B4D /* repost_form_warning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = repost_form_warning.h; path = tab_contents/repost_form_warning.h; sourceTree = "<group>"; };
A7C613B80F30D779008CEE5D /* security_style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = security_style.h; path = tab_contents/security_style.h; sourceTree = "<group>"; };
A7C613BF0F30D7E4008CEE5D /* mock_render_process_host.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mock_render_process_host.cc; path = renderer_host/mock_render_process_host.cc; sourceTree = "<group>"; };
A7C613C00F30D7E4008CEE5D /* mock_render_process_host.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mock_render_process_host.h; path = renderer_host/mock_render_process_host.h; sourceTree = "<group>"; };
@@ -2696,11 +2696,6 @@
4D7BF8E40E9D4839009A6919 /* profile_manager.cc */,
4D7BF8E50E9D4839009A6919 /* profile_manager.h */,
4D7BF8E60E9D4839009A6919 /* profile_manager_unittest.cc */,
- 4D7BF8FE0E9D4839009A6919 /* repost_form_warning_dialog.cc */,
- 4D7BF8FF0E9D4839009A6919 /* repost_form_warning_dialog.h */,
- 4D7BF9040E9D4839009A6919 /* resource_message_filter.cc */,
- 4D7BF9050E9D4839009A6919 /* resource_message_filter.h */,
- 4D7BF9060E9D4839009A6919 /* resource_request_details.h */,
4D7BF9070E9D4839009A6919 /* sandbox_policy.cc */,
4D7BF9080E9D4839009A6919 /* sandbox_policy.h */,
4D7BF9090E9D4839009A6919 /* sanity_uitest.cc */,
@@ -3408,6 +3403,7 @@
B6CCB9BA0F1EC2E100106F0D /* tab_contents */ = {
isa = PBXGroup;
children = (
+ A7A212AF0F3A698200F62B4D /* repost_form_warning.h */,
B6CCB9CE0F1EC32700106F0D /* constrained_window.h */,
B6CCB9CF0F1EC32700106F0D /* infobar_delegate.cc */,
B6CCB9D00F1EC32700106F0D /* infobar_delegate.h */,
@@ -3622,6 +3618,9 @@
A76E429A0F28ECAD009A7E88 /* renderer_security_policy_unittest.cc */,
BADB8BD20F3A4E4900989B26 /* resource_dispatcher_host.h */,
BADB8B6D0F3A356000989B26 /* resource_dispatcher_host.cc */,
+ A7A211730F3A248300F62B4D /* resource_message_filter.cc */,
+ A7A211740F3A248300F62B4D /* resource_message_filter.h */,
+ A7A211830F3A254F00F62B4D /* resource_request_details.h */,
E45075E60F150ABA003BE099 /* safe_browsing_resource_handler.cc */,
E45075E70F150ABA003BE099 /* safe_browsing_resource_handler.h */,
E45075E80F150ABA003BE099 /* save_file_resource_handler.cc */,
@@ -4744,6 +4743,7 @@
B502DA280F098056005BE90C /* visit_database_unittest.cc in Sources */,
4D7BFB420E9D4C35009A6919 /* visit_tracker_unittest.cc in Sources */,
E46C4B4C0F21098F00B393B8 /* worker_thread_ticker_unittest.cc in Sources */,
+ A7A211750F3A248300F62B4D /* resource_message_filter.cc in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};