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

Side by Side Diff: ui/gfx/insets.h

Issue 7977025: aura: Make 'ui' buildable without gtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 | « ui/gfx/canvas_skia_linux.cc ('k') | ui/gfx/native_widget_types.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 #ifndef UI_GFX_INSETS_H_ 5 #ifndef UI_GFX_INSETS_H_
6 #define UI_GFX_INSETS_H_ 6 #define UI_GFX_INSETS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "ui/base/ui_export.h" 12 #include "ui/base/ui_export.h"
13 13
14 #if defined(OS_POSIX) && !defined(OS_MACOSX) 14 #if defined(TOOLKIT_USES_GTK)
15 #include <gtk/gtkstyle.h> 15 #include <gtk/gtkstyle.h>
16 #endif 16 #endif
17 17
18 namespace gfx { 18 namespace gfx {
19 19
20 // 20 //
21 // An insets represents the borders of a container (the space the container must 21 // An insets represents the borders of a container (the space the container must
22 // leave at each of its edges). 22 // leave at each of its edges).
23 // 23 //
24 24
25 class UI_EXPORT Insets { 25 class UI_EXPORT Insets {
26 public: 26 public:
27 Insets() : top_(0), left_(0), bottom_(0), right_(0) {} 27 Insets() : top_(0), left_(0), bottom_(0), right_(0) {}
28 Insets(int top, int left, int bottom, int right) 28 Insets(int top, int left, int bottom, int right)
29 : top_(top), 29 : top_(top),
30 left_(left), 30 left_(left),
31 bottom_(bottom), 31 bottom_(bottom),
32 right_(right) {} 32 right_(right) {}
33 #if defined(OS_POSIX) && !defined(OS_MACOSX) 33 #if defined(TOOLKIT_USES_GTK)
34 explicit Insets(const GtkBorder& border) 34 explicit Insets(const GtkBorder& border)
35 : top_(border.top), 35 : top_(border.top),
36 left_(border.left), 36 left_(border.left),
37 bottom_(border.bottom), 37 bottom_(border.bottom),
38 right_(border.right) {} 38 right_(border.right) {}
39 #endif 39 #endif
40 40
41 ~Insets() {} 41 ~Insets() {}
42 42
43 int top() const { return top_; } 43 int top() const { return top_; }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 private: 86 private:
87 int top_; 87 int top_;
88 int left_; 88 int left_;
89 int bottom_; 89 int bottom_;
90 int right_; 90 int right_;
91 }; 91 };
92 92
93 } // namespace gfx 93 } // namespace gfx
94 94
95 #endif // UI_GFX_INSETS_H_ 95 #endif // UI_GFX_INSETS_H_
OLDNEW
« no previous file with comments | « ui/gfx/canvas_skia_linux.cc ('k') | ui/gfx/native_widget_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698