Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: views/test/test_views_delegate.h

Issue 6004010: Implement clipboard features in views textfield. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: code style fixes Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/textfield/textfield_views_model_unittest.cc ('k') | views/view_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « views/controls/textfield/textfield_views_model_unittest.cc ('k') | views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698