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

Side by Side Diff: views/widget/widget.h

Issue 7466017: Fixes crash introduced by fix for 11229. The fix for 11229 made it so (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « chrome/browser/ui/views/frame/browser_view.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 #ifndef VIEWS_WIDGET_WIDGET_H_ 5 #ifndef VIEWS_WIDGET_WIDGET_H_
6 #define VIEWS_WIDGET_WIDGET_H_ 6 #define VIEWS_WIDGET_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <stack> 9 #include <stack>
10 10
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 475 }
476 const NonClientView* non_client_view() const { 476 const NonClientView* non_client_view() const {
477 return non_client_view_; 477 return non_client_view_;
478 } 478 }
479 479
480 ClientView* client_view() { 480 ClientView* client_view() {
481 return const_cast<ClientView*>( 481 return const_cast<ClientView*>(
482 const_cast<const Widget*>(this)->client_view()); 482 const_cast<const Widget*>(this)->client_view());
483 } 483 }
484 const ClientView* client_view() const { 484 const ClientView* client_view() const {
485 return non_client_view()->client_view(); 485 return non_client_view() ? non_client_view()->client_view() : NULL;
Peter Kasting 2011/07/20 23:09:40 Nit: Might as well use |non_client_view_| directly
486 } 486 }
487 487
488 #if defined(UNIT_TEST) 488 #if defined(UNIT_TEST)
489 static void set_compositor_factory(ui::Compositor*(*factory)()) { 489 static void set_compositor_factory(ui::Compositor*(*factory)()) {
490 compositor_factory_ = factory; 490 compositor_factory_ = factory;
491 } 491 }
492 #endif 492 #endif
493 static ui::Compositor* (*compositor_factory())() { 493 static ui::Compositor* (*compositor_factory())() {
494 return compositor_factory_; 494 return compositor_factory_;
495 } 495 }
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 698
699 // Factory used to create Compositors. Settable by tests. 699 // Factory used to create Compositors. Settable by tests.
700 static ui::Compositor*(*compositor_factory_)(); 700 static ui::Compositor*(*compositor_factory_)();
701 701
702 DISALLOW_COPY_AND_ASSIGN(Widget); 702 DISALLOW_COPY_AND_ASSIGN(Widget);
703 }; 703 };
704 704
705 } // namespace views 705 } // namespace views
706 706
707 #endif // VIEWS_WIDGET_WIDGET_H_ 707 #endif // VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698