- add sources.
[platform/framework/web/crosswalk.git] / src / ui / views / test / test_views_delegate.h
1 // Copyright (c) 2012 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 UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_
6 #define UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "build/build_config.h"
12 #include "ui/base/accessibility/accessibility_types.h"
13 #include "ui/views/views_delegate.h"
14
15 namespace ui {
16 class Clipboard;
17 }
18
19 namespace views {
20 class View;
21 class Widget;
22
23 class TestViewsDelegate : public ViewsDelegate {
24  public:
25   TestViewsDelegate();
26   virtual ~TestViewsDelegate();
27
28   void SetUseTransparentWindows(bool transparent);
29
30   // Overridden from ViewsDelegate:
31   virtual void SaveWindowPlacement(const Widget* window,
32                                    const std::string& window_name,
33                                    const gfx::Rect& bounds,
34                                    ui::WindowShowState show_state) OVERRIDE;
35   virtual bool GetSavedWindowPlacement(
36       const Widget* window,
37       const std::string& window_name,
38       gfx::Rect* bounds,
39       ui::WindowShowState* show_state) const OVERRIDE;
40
41   virtual void NotifyAccessibilityEvent(
42       View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE {}
43
44   virtual void NotifyMenuItemFocused(const string16& menu_name,
45                                      const string16& menu_item_name,
46                                      int item_index,
47                                      int item_count,
48                                      bool has_submenu) OVERRIDE {}
49 #if defined(OS_WIN)
50   virtual HICON GetDefaultWindowIcon() const OVERRIDE {
51     return NULL;
52   }
53 #endif
54   virtual NonClientFrameView* CreateDefaultNonClientFrameView(
55       Widget* widget) OVERRIDE;
56   virtual bool UseTransparentWindows() const OVERRIDE;
57   virtual void AddRef() OVERRIDE {}
58   virtual void ReleaseRef() OVERRIDE {}
59   virtual content::WebContents* CreateWebContents(
60       content::BrowserContext* browser_context,
61       content::SiteInstance* site_instance) OVERRIDE;
62   virtual void OnBeforeWidgetInit(
63       Widget::InitParams* params,
64       internal::NativeWidgetDelegate* delegate) OVERRIDE;
65   virtual base::TimeDelta GetDefaultTextfieldObscuredRevealDuration() OVERRIDE;
66
67  private:
68   bool use_transparent_windows_;
69
70   DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate);
71 };
72
73 }  // namespace views
74
75 #endif  // UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_