OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "ui/base/accessibility/accessibility_types.h" | 12 #include "ui/base/accessibility/accessibility_types.h" |
13 #include "views/views_delegate.h" | 13 #include "views/views_delegate.h" |
14 | 14 |
15 class ChromeViewsDelegate : public views::ViewsDelegate { | 15 class ChromeViewsDelegate : public views::ViewsDelegate { |
16 public: | 16 public: |
17 static views::View* default_parent_view; | 17 static views::View* default_parent_view; |
18 | 18 |
19 ChromeViewsDelegate() {} | 19 ChromeViewsDelegate() {} |
20 virtual ~ChromeViewsDelegate() {} | 20 virtual ~ChromeViewsDelegate() {} |
21 | 21 |
22 // Overridden from views::ViewsDelegate: | 22 // Overridden from views::ViewsDelegate: |
23 virtual ui::Clipboard* GetClipboard() const OVERRIDE; | 23 virtual ui::Clipboard* GetClipboard() const OVERRIDE; |
24 virtual views::View* GetDefaultParentView() OVERRIDE; | 24 virtual views::View* GetDefaultParentView() OVERRIDE; |
25 virtual void SaveWindowPlacement(const views::Widget* window, | 25 virtual void SaveWindowPlacement(const views::Widget* window, |
26 const std::wstring& window_name, | 26 const std::wstring& window_name, |
27 const gfx::Rect& bounds, | 27 const gfx::Rect& bounds, |
28 bool maximized) OVERRIDE; | 28 ui::WindowShowState show_state) OVERRIDE; |
29 virtual bool GetSavedWindowBounds(const std::wstring& window_name, | 29 virtual bool GetSavedWindowPlacement( |
30 gfx::Rect* bounds) const OVERRIDE; | 30 const std::wstring& window_name, |
31 virtual bool GetSavedMaximizedState(const std::wstring& window_name, | 31 gfx::Rect* bounds, |
32 bool* maximized) const OVERRIDE; | 32 ui::WindowShowState* show_state) const OVERRIDE; |
33 virtual void NotifyAccessibilityEvent( | 33 virtual void NotifyAccessibilityEvent( |
34 views::View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE; | 34 views::View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE; |
35 virtual void NotifyMenuItemFocused( | 35 virtual void NotifyMenuItemFocused( |
36 const std::wstring& menu_name, | 36 const std::wstring& menu_name, |
37 const std::wstring& menu_item_name, | 37 const std::wstring& menu_item_name, |
38 int item_index, | 38 int item_index, |
39 int item_count, | 39 int item_count, |
40 bool has_submenu) OVERRIDE; | 40 bool has_submenu) OVERRIDE; |
41 | 41 |
42 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
43 virtual HICON GetDefaultWindowIcon() const OVERRIDE; | 43 virtual HICON GetDefaultWindowIcon() const OVERRIDE; |
44 #endif | 44 #endif |
45 virtual void AddRef() OVERRIDE; | 45 virtual void AddRef() OVERRIDE; |
46 virtual void ReleaseRef() OVERRIDE; | 46 virtual void ReleaseRef() OVERRIDE; |
47 | 47 |
48 virtual int GetDispositionForEvent(int event_flags) OVERRIDE; | 48 virtual int GetDispositionForEvent(int event_flags) OVERRIDE; |
49 | 49 |
50 private: | 50 private: |
51 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate); | 51 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate); |
52 }; | 52 }; |
53 | 53 |
54 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ | 54 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ |
OLD | NEW |