OLD | NEW |
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 "chrome/browser/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/gtk/browser_window_gtk.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2178 // Right edge. | 2178 // Right edge. |
2179 if (y < kResizeAreaCornerSize - kTopResizeAdjust) { | 2179 if (y < kResizeAreaCornerSize - kTopResizeAdjust) { |
2180 *edge = GDK_WINDOW_EDGE_NORTH_EAST; | 2180 *edge = GDK_WINDOW_EDGE_NORTH_EAST; |
2181 } else if (y < bounds_.height() - kResizeAreaCornerSize) { | 2181 } else if (y < bounds_.height() - kResizeAreaCornerSize) { |
2182 *edge = GDK_WINDOW_EDGE_EAST; | 2182 *edge = GDK_WINDOW_EDGE_EAST; |
2183 } else { | 2183 } else { |
2184 *edge = GDK_WINDOW_EDGE_SOUTH_EAST; | 2184 *edge = GDK_WINDOW_EDGE_SOUTH_EAST; |
2185 } | 2185 } |
2186 return true; | 2186 return true; |
2187 } | 2187 } |
| 2188 |
2188 NOTREACHED(); | 2189 NOTREACHED(); |
| 2190 return false; |
2189 } | 2191 } |
2190 | 2192 |
2191 bool BrowserWindowGtk::UseCustomFrame() { | 2193 bool BrowserWindowGtk::UseCustomFrame() { |
2192 // We don't use the custom frame for app mode windows or app window popups. | 2194 // We don't use the custom frame for app mode windows or app window popups. |
2193 return use_custom_frame_pref_.GetValue() && | 2195 return use_custom_frame_pref_.GetValue() && |
2194 browser_->type() != Browser::TYPE_APP && | 2196 browser_->type() != Browser::TYPE_APP && |
2195 browser_->type() != Browser::TYPE_APP_POPUP; | 2197 browser_->type() != Browser::TYPE_APP_POPUP; |
2196 } | 2198 } |
2197 | 2199 |
2198 bool BrowserWindowGtk::BoundsMatchMonitorSize() { | 2200 bool BrowserWindowGtk::BoundsMatchMonitorSize() { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2242 // special-case the ones where the custom frame should be used. These names | 2244 // special-case the ones where the custom frame should be used. These names |
2243 // are taken from the WMs' source code. | 2245 // are taken from the WMs' source code. |
2244 return (wm_name == "Blackbox" || | 2246 return (wm_name == "Blackbox" || |
2245 wm_name == "compiz" || | 2247 wm_name == "compiz" || |
2246 wm_name == "e16" || // Enlightenment DR16 | 2248 wm_name == "e16" || // Enlightenment DR16 |
2247 wm_name == "Metacity" || | 2249 wm_name == "Metacity" || |
2248 wm_name == "Mutter" || | 2250 wm_name == "Mutter" || |
2249 wm_name == "Openbox" || | 2251 wm_name == "Openbox" || |
2250 wm_name == "Xfwm4"); | 2252 wm_name == "Xfwm4"); |
2251 } | 2253 } |
OLD | NEW |