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

Side by Side Diff: mojo/services/public/cpp/view_manager/lib/view.cc

Issue 372163005: Fixes for re-enabling more MSVC level 4 warnings: mojo/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Actually test |was_called| Created 6 years, 5 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 | « mojo/services/public/cpp/view_manager/lib/node.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "mojo/services/public/cpp/view_manager/view.h" 5 #include "mojo/services/public/cpp/view_manager/view.h"
6 6
7 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h" 7 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h"
8 #include "mojo/services/public/cpp/view_manager/lib/view_private.h" 8 #include "mojo/services/public/cpp/view_manager/lib/view_private.h"
9 #include "mojo/services/public/cpp/view_manager/node.h" 9 #include "mojo/services/public/cpp/view_manager/node.h"
10 #include "mojo/services/public/cpp/view_manager/view_observer.h" 10 #include "mojo/services/public/cpp/view_manager/view_observer.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 canvas.DrawColor(color); 68 canvas.DrawColor(color);
69 SetContents(skia::GetTopDevice(*canvas.sk_canvas())->accessBitmap(true)); 69 SetContents(skia::GetTopDevice(*canvas.sk_canvas())->accessBitmap(true));
70 } 70 }
71 71
72 View::View(ViewManager* manager) 72 View::View(ViewManager* manager)
73 : id_(static_cast<ViewManagerClientImpl*>(manager)->CreateView()), 73 : id_(static_cast<ViewManagerClientImpl*>(manager)->CreateView()),
74 node_(NULL), 74 node_(NULL),
75 manager_(manager) {} 75 manager_(manager) {}
76 76
77 View::View() 77 View::View()
78 : id_(-1), 78 : id_(static_cast<Id>(-1)),
79 node_(NULL), 79 node_(NULL),
80 manager_(NULL) {} 80 manager_(NULL) {}
81 81
82 View::~View() { 82 View::~View() {
83 ScopedDestructionNotifier notifier(this); 83 ScopedDestructionNotifier notifier(this);
84 // TODO(beng): It'd be better to do this via a destruction observer in the 84 // TODO(beng): It'd be better to do this via a destruction observer in the
85 // ViewManagerClientImpl. 85 // ViewManagerClientImpl.
86 if (manager_) 86 if (manager_)
87 static_cast<ViewManagerClientImpl*>(manager_)->RemoveView(id_); 87 static_cast<ViewManagerClientImpl*>(manager_)->RemoveView(id_);
88 } 88 }
89 89
90 void View::LocalDestroy() { 90 void View::LocalDestroy() {
91 delete this; 91 delete this;
92 } 92 }
93 93
94 } // namespace view_manager 94 } // namespace view_manager
95 } // namespace mojo 95 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/view_manager/lib/node.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698