| 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 GetSavedWindowBounds(const std::wstring& window_name, |
| 30 gfx::Rect* bounds) const OVERRIDE; | 30 gfx::Rect* bounds) const OVERRIDE; |
| 31 virtual bool GetSavedMaximizedState(const std::wstring& window_name, | 31 virtual bool GetSavedWindowShowState( |
| 32 bool* maximized) const OVERRIDE; | 32 const std::wstring& window_name, |
| 33 ui::WindowShowState* show_state) const OVERRIDE; |
| 33 virtual void NotifyAccessibilityEvent( | 34 virtual void NotifyAccessibilityEvent( |
| 34 views::View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE; | 35 views::View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE; |
| 35 virtual void NotifyMenuItemFocused( | 36 virtual void NotifyMenuItemFocused( |
| 36 const std::wstring& menu_name, | 37 const std::wstring& menu_name, |
| 37 const std::wstring& menu_item_name, | 38 const std::wstring& menu_item_name, |
| 38 int item_index, | 39 int item_index, |
| 39 int item_count, | 40 int item_count, |
| 40 bool has_submenu) OVERRIDE; | 41 bool has_submenu) OVERRIDE; |
| 41 | 42 |
| 42 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
| 43 virtual HICON GetDefaultWindowIcon() const OVERRIDE; | 44 virtual HICON GetDefaultWindowIcon() const OVERRIDE; |
| 44 #endif | 45 #endif |
| 45 virtual void AddRef() OVERRIDE; | 46 virtual void AddRef() OVERRIDE; |
| 46 virtual void ReleaseRef() OVERRIDE; | 47 virtual void ReleaseRef() OVERRIDE; |
| 47 | 48 |
| 48 virtual int GetDispositionForEvent(int event_flags) OVERRIDE; | 49 virtual int GetDispositionForEvent(int event_flags) OVERRIDE; |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate); | 52 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate); |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ | 55 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ |
| OLD | NEW |