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

Side by Side Diff: ui/views/widget/native_widget_mac.mm

Issue 559873002: MacViews: Ensure the RootView is in place before the first call to ReorderNativeViews (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20140909-MacViews-Everything-Compiles
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | ui/views/widget/widget_unittest.cc » ('j') | ui/views/widget/widget_unittest.cc » ('J')
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 "ui/views/widget/native_widget_mac.h" 5 #include "ui/views/widget/native_widget_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 initWithContentRect:content_rect 111 initWithContentRect:content_rect
112 styleMask:style_mask 112 styleMask:style_mask
113 backing:NSBackingStoreBuffered 113 backing:NSBackingStoreBuffered
114 defer:YES]); 114 defer:YES]);
115 [window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject. 115 [window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject.
116 bridge_->Init(window, params); 116 bridge_->Init(window, params);
117 117
118 delegate_->OnNativeWidgetCreated(true); 118 delegate_->OnNativeWidgetCreated(true);
119 119
120 bridge_->SetFocusManager(GetWidget()->GetFocusManager()); 120 bridge_->SetFocusManager(GetWidget()->GetFocusManager());
121
122 DCHECK(GetWidget()->GetRootView());
123 bridge_->SetRootView(GetWidget()->GetRootView());
121 } 124 }
122 125
123 NonClientFrameView* NativeWidgetMac::CreateNonClientFrameView() { 126 NonClientFrameView* NativeWidgetMac::CreateNonClientFrameView() {
124 return new NativeFrameView(GetWidget()); 127 return new NativeFrameView(GetWidget());
125 } 128 }
126 129
127 bool NativeWidgetMac::ShouldUseNativeFrame() const { 130 bool NativeWidgetMac::ShouldUseNativeFrame() const {
128 return true; 131 return true;
129 } 132 }
130 133
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 599 }
597 600
598 // static 601 // static
599 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { 602 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() {
600 NOTIMPLEMENTED(); 603 NOTIMPLEMENTED();
601 return gfx::FontList(); 604 return gfx::FontList();
602 } 605 }
603 606
604 } // namespace internal 607 } // namespace internal
605 } // namespace views 608 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/widget_unittest.cc » ('j') | ui/views/widget/widget_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698