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

Unified Diff: chrome/browser/validation_message_message_filter.h

Issue 13160004: Re-implement form validation message UI with native widgets. (Common and Mac) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/validation_message_message_filter.h
diff --git a/chrome/browser/validation_message_message_filter.h b/chrome/browser/validation_message_message_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..2fbdba381b6c519e653940a782c9e34192fc853d
--- /dev/null
+++ b/chrome/browser/validation_message_message_filter.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2013 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_VALIDATION_MESSAGE_MESSAGE_FILTER_H_
+#define CHROME_BROWSER_VALIDATION_MESSAGE_MESSAGE_FILTER_H_
+
+#include "content/public/browser/browser_message_filter.h"
+
+namespace chrome {
+class ValidationMessageBubble;
+}
+
+namespace gfx {
+class Rect;
+}
+
+// A message filter implementation that receives validation message requests
+// from ValidationMessageAgent.
+class ValidationMessageMessageFilter : public content::BrowserMessageFilter {
+ public:
+ explicit ValidationMessageMessageFilter(int renderer_id);
+
+ // content::BrowserMessageFilter implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok) OVERRIDE;
+ virtual void OverrideThreadForMessage(
+ const IPC::Message& message, content::BrowserThread::ID* thread) OVERRIDE;
+
+ private:
+ virtual ~ValidationMessageMessageFilter();
+ void OnShowValidationMessage(int route_id,
+ const gfx::Rect& anchor_in_screen,
+ const string16& main_text,
+ const string16& sub_text);
+ void OnHideValidationMessage();
+
+ scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_;
+ int renderer_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(ValidationMessageMessageFilter);
+};
+
+#endif // CHROME_BROWSER_VALIDATION_MESSAGE_MESSAGE_FILTER_H_
« no previous file with comments | « chrome/browser/ui/views/validation_message_bubble_view.cc ('k') | chrome/browser/validation_message_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698