OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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 #include "base/scoped_ptr.h" |
| 6 #include "ui/base/clipboard/clipboard.h" |
| 7 #include "views/views_delegate.h" |
| 8 |
| 9 class TestViewsDelegate : public views::ViewsDelegate { |
| 10 public: |
| 11 TestViewsDelegate() {} |
| 12 virtual ~TestViewsDelegate() {} |
| 13 |
| 14 // Overridden from views::ViewsDelegate: |
| 15 virtual ui::Clipboard* GetClipboard() const { |
| 16 if (!clipboard_.get()) { |
| 17 // Note that we need a MessageLoop for the next call to work. |
| 18 clipboard_.reset(new ui::Clipboard); |
| 19 } |
| 20 return clipboard_.get(); |
| 21 } |
| 22 virtual void SaveWindowPlacement(const std::wstring& window_name, |
| 23 const gfx::Rect& bounds, |
| 24 bool maximized) { |
| 25 } |
| 26 virtual bool GetSavedWindowBounds(const std::wstring& window_name, |
| 27 gfx::Rect* bounds) const { |
| 28 return false; |
| 29 } |
| 30 virtual bool GetSavedMaximizedState(const std::wstring& window_name, |
| 31 bool* maximized) const { |
| 32 return false; |
| 33 } |
| 34 virtual void NotifyAccessibilityEvent( |
| 35 views::View* view, AccessibilityTypes::Event event_type) {} |
| 36 #if defined(OS_WIN) |
| 37 virtual HICON GetDefaultWindowIcon() const { |
| 38 return NULL; |
| 39 } |
| 40 #endif |
| 41 virtual void AddRef() {} |
| 42 virtual void ReleaseRef() {} |
| 43 |
| 44 private: |
| 45 mutable scoped_ptr<ui::Clipboard> clipboard_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate); |
| 48 }; |
| 49 |
OLD | NEW |