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

Side by Side Diff: ui/views/widget/gtk_views_fixed.cc

Issue 8598031: views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland for real Created 9 years, 1 month 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/widget/gtk_views_fixed.h ('k') | ui/views/widget/gtk_views_window.h » ('j') | 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/gtk_views_fixed.h" 5 #include "ui/views/widget/gtk_views_fixed.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 // We store whether we use the widget's allocated size as a property. Ideally 9 // We store whether we use the widget's allocated size as a property. Ideally
10 // we would stash this in GtkFixedChild, but GtkFixed doesn't allow subclassing 10 // we would stash this in GtkFixedChild, but GtkFixed doesn't allow subclassing
11 // gtk_fixed_put. Alternatively we could subclass GtkContainer and use our own 11 // gtk_fixed_put. Alternatively we could subclass GtkContainer and use our own
12 // API (effectively duplicating GtkFixed), but that means folks could no longer 12 // API (effectively duplicating GtkFixed), but that means folks could no longer
13 // use the GtkFixed API else where in Chrome. For now I'm going with this route. 13 // use the GtkFixed API else where in Chrome. For now I'm going with this route.
14 static const char* kUseAllocatedSize = "__VIEWS_USE_ALLOCATED_SIZE__"; 14 static const char* kUseAllocatedSize = "__VIEWS_USE_ALLOCATED_SIZE__";
15 static const char* kRequisitionWidth = "__VIEWS_REQUISITION_WIDTH__"; 15 static const char* kRequisitionWidth = "__VIEWS_REQUISITION_WIDTH__";
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 DCHECK(width); 96 DCHECK(width);
97 DCHECK(height); 97 DCHECK(height);
98 *width = reinterpret_cast<glong>(g_object_get_data(G_OBJECT(widget), 98 *width = reinterpret_cast<glong>(g_object_get_data(G_OBJECT(widget),
99 kRequisitionWidth)); 99 kRequisitionWidth));
100 *height = reinterpret_cast<glong>(g_object_get_data(G_OBJECT(widget), 100 *height = reinterpret_cast<glong>(g_object_get_data(G_OBJECT(widget),
101 kRequisitionHeight)); 101 kRequisitionHeight));
102 return (g_object_get_data(G_OBJECT(widget), kUseAllocatedSize) != 0); 102 return (g_object_get_data(G_OBJECT(widget), kUseAllocatedSize) != 0);
103 } 103 }
104 104
105 G_END_DECLS 105 G_END_DECLS
OLDNEW
« no previous file with comments | « ui/views/widget/gtk_views_fixed.h ('k') | ui/views/widget/gtk_views_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698