Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / components / web_modal / test_web_contents_modal_dialog_manager_delegate.h
1 // Copyright 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.
4
5 #ifndef COMPONENTS_WEB_MODAL_TEST_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_
6 #define COMPONENTS_WEB_MODAL_TEST_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_
7
8 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12
13 namespace web_modal {
14
15 class TestWebContentsModalDialogManagerDelegate
16     : public WebContentsModalDialogManagerDelegate {
17  public:
18   TestWebContentsModalDialogManagerDelegate();
19
20   // WebContentsModalDialogManagerDelegate overrides:
21   void SetWebContentsBlocked(content::WebContents* web_contents,
22                              bool blocked) override;
23
24   WebContentsModalDialogHost* GetWebContentsModalDialogHost() override;
25
26   bool IsWebContentsVisible(content::WebContents* web_contents) override;
27
28   void set_web_contents_visible(bool visible) {
29     web_contents_visible_ = visible;
30   }
31
32   void set_web_contents_modal_dialog_host(WebContentsModalDialogHost* host) {
33     web_contents_modal_dialog_host_ = host;
34   }
35
36   bool web_contents_blocked() const { return web_contents_blocked_; }
37
38  private:
39   bool web_contents_visible_;
40   bool web_contents_blocked_;
41   WebContentsModalDialogHost* web_contents_modal_dialog_host_;  // Not owned.
42
43   DISALLOW_COPY_AND_ASSIGN(TestWebContentsModalDialogManagerDelegate);
44 };
45
46 }  // namespace web_modal
47
48 #endif  // COMPONENTS_WEB_MODAL_TEST_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_