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

Side by Side Diff: ui/views_core/bridged_view_mac.mm

Issue 187483005: Extending the Views-on-Mac experiment: whole app list grid. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: still compiles r263560 + crrev/195793005 Created 6 years, 8 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 | « ui/views_core/bridged_view_mac.h ('k') | ui/views_core/menu_runner_mac.mm » ('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 2013 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 #import "ui/views_core/bridged_view_mac.h"
6
7 #import <Cocoa/Cocoa.h>
8
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/views/view.h"
11 #include "ui/views_core/bridged_view_impl_mac.h"
12
13 namespace views {
14
15 BridgedViewBase::BridgedViewBase() {}
16
17 BridgedViewBase::BridgedViewBase(views::View* view) {
18 ResetView(view);
19 }
20
21 void BridgedViewBase::ResetView(views::View* view) {
22 [bridged_view_ clearView];
23 bridged_view_.reset();
24 if (!view)
25 return;
26
27 scoped_ptr<View> viewToHost(view);
28 bridged_view_.reset([[BridgedViewImpl alloc] initWithView:viewToHost.Pass()]);
29 }
30
31 BridgedViewBase::~BridgedViewBase() {
32 ResetView(NULL);
33 }
34
35 NSView* BridgedViewBase::GetNSView() {
36 return bridged_view_;
37 }
38
39 View* BridgedViewBase::GetView() {
40 return [bridged_view_ view];
41 }
42
43 } // namespace views
OLDNEW
« no previous file with comments | « ui/views_core/bridged_view_mac.h ('k') | ui/views_core/menu_runner_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698