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

Side by Side Diff: views/widget/native_widget_views.cc

Issue 7978011: Possible workaround for bug with loading pages in a background tab (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Implementing request to give aura build default info Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_views.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/widget/native_widget_views.h" 5 #include "views/widget/native_widget_views.h"
6 6
7 #include "ui/gfx/compositor/compositor.h" 7 #include "ui/gfx/compositor/compositor.h"
8 #include "views/desktop/desktop_window_view.h" 8 #include "views/desktop/desktop_window_view.h"
9 #include "views/view.h" 9 #include "views/view.h"
10 #include "views/views_delegate.h" 10 #include "views/views_delegate.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 Widget* NativeWidgetViews::GetWidget() { 165 Widget* NativeWidgetViews::GetWidget() {
166 return delegate_->AsWidget(); 166 return delegate_->AsWidget();
167 } 167 }
168 168
169 const Widget* NativeWidgetViews::GetWidget() const { 169 const Widget* NativeWidgetViews::GetWidget() const {
170 return delegate_->AsWidget(); 170 return delegate_->AsWidget();
171 } 171 }
172 172
173 gfx::NativeView NativeWidgetViews::GetNativeView() const { 173 gfx::NativeView NativeWidgetViews::GetNativeView() const {
174 return GetParentNativeWidget()->GetNativeView(); 174 return GetParentNativeWidget() ?
175 GetParentNativeWidget()->GetNativeView() : NULL;
175 } 176 }
176 177
177 gfx::NativeWindow NativeWidgetViews::GetNativeWindow() const { 178 gfx::NativeWindow NativeWidgetViews::GetNativeWindow() const {
178 return GetParentNativeWidget()->GetNativeWindow(); 179 return GetParentNativeWidget() ?
180 GetParentNativeWidget()->GetNativeWindow() : NULL;
179 } 181 }
180 182
181 Widget* NativeWidgetViews::GetTopLevelWidget() { 183 Widget* NativeWidgetViews::GetTopLevelWidget() {
182 // This can get called when this is in the process of being destroyed, and 184 // This can get called when this is in the process of being destroyed, and
183 // view_ has already been unset. 185 // view_ has already been unset.
184 if (!view_) 186 if (!view_)
185 return GetWidget(); 187 return GetWidget();
186 if (ViewsDelegate::views_delegate && 188 if (ViewsDelegate::views_delegate &&
187 view_->parent() == ViewsDelegate::views_delegate->GetDefaultParentView()) 189 view_->parent() == ViewsDelegate::views_delegate->GetDefaultParentView())
188 return GetWidget(); 190 return GetWidget();
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } 581 }
580 default: 582 default:
581 // Everything else falls into standard client event handling. 583 // Everything else falls into standard client event handling.
582 break; 584 break;
583 } 585 }
584 } 586 }
585 return false; 587 return false;
586 } 588 }
587 589
588 } // namespace views 590 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698