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; | |
18 | |
19 ChromeViewsDelegate() {} | 17 ChromeViewsDelegate() {} |
20 virtual ~ChromeViewsDelegate() {} | 18 virtual ~ChromeViewsDelegate() {} |
21 | 19 |
22 // Overridden from views::ViewsDelegate: | 20 // Overridden from views::ViewsDelegate: |
23 virtual ui::Clipboard* GetClipboard() const OVERRIDE; | 21 virtual ui::Clipboard* GetClipboard() const OVERRIDE; |
24 virtual views::View* GetDefaultParentView() OVERRIDE; | |
25 virtual void SaveWindowPlacement(const views::Widget* window, | 22 virtual void SaveWindowPlacement(const views::Widget* window, |
26 const std::string& window_name, | 23 const std::string& window_name, |
27 const gfx::Rect& bounds, | 24 const gfx::Rect& bounds, |
28 ui::WindowShowState show_state) OVERRIDE; | 25 ui::WindowShowState show_state) OVERRIDE; |
29 virtual bool GetSavedWindowPlacement( | 26 virtual bool GetSavedWindowPlacement( |
30 const std::string& window_name, | 27 const std::string& window_name, |
31 gfx::Rect* bounds, | 28 gfx::Rect* bounds, |
32 ui::WindowShowState* show_state) const OVERRIDE; | 29 ui::WindowShowState* show_state) const OVERRIDE; |
33 virtual void NotifyAccessibilityEvent( | 30 virtual void NotifyAccessibilityEvent( |
34 views::View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE; | 31 views::View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE; |
35 virtual void NotifyMenuItemFocused(const string16& menu_name, | 32 virtual void NotifyMenuItemFocused(const string16& menu_name, |
36 const string16& menu_item_name, | 33 const string16& menu_item_name, |
37 int item_index, | 34 int item_index, |
38 int item_count, | 35 int item_count, |
39 bool has_submenu) OVERRIDE; | 36 bool has_submenu) OVERRIDE; |
40 | 37 |
41 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
42 virtual HICON GetDefaultWindowIcon() const OVERRIDE; | 39 virtual HICON GetDefaultWindowIcon() const OVERRIDE; |
43 #endif | 40 #endif |
44 virtual void AddRef() OVERRIDE; | 41 virtual void AddRef() OVERRIDE; |
45 virtual void ReleaseRef() OVERRIDE; | 42 virtual void ReleaseRef() OVERRIDE; |
46 | 43 |
47 virtual int GetDispositionForEvent(int event_flags) OVERRIDE; | 44 virtual int GetDispositionForEvent(int event_flags) OVERRIDE; |
48 | 45 |
49 private: | 46 private: |
50 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate); | 47 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate); |
51 }; | 48 }; |
52 | 49 |
53 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ | 50 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ |
OLD | NEW |