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/ui/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/ui/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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 cairo_paint(cr); | 533 cairo_paint(cr); |
534 } | 534 } |
535 } | 535 } |
536 | 536 |
537 int BrowserWindowGtk::GetVerticalOffset() { | 537 int BrowserWindowGtk::GetVerticalOffset() { |
538 return (IsMaximized() || (!UseCustomFrame())) ? | 538 return (IsMaximized() || (!UseCustomFrame())) ? |
539 -kCustomFrameBackgroundVerticalOffset : 0; | 539 -kCustomFrameBackgroundVerticalOffset : 0; |
540 } | 540 } |
541 | 541 |
542 int BrowserWindowGtk::GetThemeFrameResource() { | 542 int BrowserWindowGtk::GetThemeFrameResource() { |
543 bool off_the_record = browser()->profile()->IsOffTheRecord(); | 543 bool incognito = browser()->profile()->IsOffTheRecord(); |
544 int image_name; | 544 int image_name; |
545 if (IsActive()) { | 545 if (IsActive()) { |
546 image_name = off_the_record ? IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME; | 546 image_name = incognito ? IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME; |
547 } else { | 547 } else { |
548 image_name = off_the_record ? IDR_THEME_FRAME_INCOGNITO_INACTIVE : | 548 image_name = incognito ? IDR_THEME_FRAME_INCOGNITO_INACTIVE : |
549 IDR_THEME_FRAME_INACTIVE; | 549 IDR_THEME_FRAME_INACTIVE; |
550 } | 550 } |
551 | 551 |
552 return image_name; | 552 return image_name; |
553 } | 553 } |
554 | 554 |
555 void BrowserWindowGtk::Show() { | 555 void BrowserWindowGtk::Show() { |
556 // The Browser associated with this browser window must become the active | 556 // The Browser associated with this browser window must become the active |
557 // browser at the time Show() is called. This is the natural behaviour under | 557 // browser at the time Show() is called. This is the natural behaviour under |
558 // Windows, but gtk_widget_show won't show the widget (and therefore won't | 558 // Windows, but gtk_widget_show won't show the widget (and therefore won't |
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2265 // special-case the ones where the custom frame should be used. These names | 2265 // special-case the ones where the custom frame should be used. These names |
2266 // are taken from the WMs' source code. | 2266 // are taken from the WMs' source code. |
2267 return (wm_name == "Blackbox" || | 2267 return (wm_name == "Blackbox" || |
2268 wm_name == "compiz" || | 2268 wm_name == "compiz" || |
2269 wm_name == "e16" || // Enlightenment DR16 | 2269 wm_name == "e16" || // Enlightenment DR16 |
2270 wm_name == "Metacity" || | 2270 wm_name == "Metacity" || |
2271 wm_name == "Mutter" || | 2271 wm_name == "Mutter" || |
2272 wm_name == "Openbox" || | 2272 wm_name == "Openbox" || |
2273 wm_name == "Xfwm4"); | 2273 wm_name == "Xfwm4"); |
2274 } | 2274 } |
OLD | NEW |