1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_VALIDATION_MESSAGE_MESSAGE_FILTER_H_
6 #define CHROME_BROWSER_VALIDATION_MESSAGE_MESSAGE_FILTER_H_
8 #include "content/public/browser/browser_message_filter.h"
11 class ValidationMessageBubble;
18 // A message filter implementation that receives validation message requests
19 // from ValidationMessageAgent.
20 class ValidationMessageMessageFilter : public content::BrowserMessageFilter {
22 explicit ValidationMessageMessageFilter(int renderer_id);
24 // content::BrowserMessageFilter implementation.
25 virtual bool OnMessageReceived(const IPC::Message& message,
26 bool* message_was_ok) OVERRIDE;
27 virtual void OverrideThreadForMessage(
28 const IPC::Message& message, content::BrowserThread::ID* thread) OVERRIDE;
31 virtual ~ValidationMessageMessageFilter();
32 void OnShowValidationMessage(int route_id,
33 const gfx::Rect& anchor_in_root_view,
34 const string16& main_text,
35 const string16& sub_text);
36 void OnHideValidationMessage();
37 void OnMoveValidationMessage(int route_id,
38 const gfx::Rect& anchor_in_root_view);
40 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_;
43 DISALLOW_COPY_AND_ASSIGN(ValidationMessageMessageFilter);
46 #endif // CHROME_BROWSER_VALIDATION_MESSAGE_MESSAGE_FILTER_H_