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

Side by Side Diff: chrome/browser/ui/gtk/apps/native_app_window_gtk.cc

Issue 166443004: Add frame color option to packaged app windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/apps/native_app_window_gtk.h" 5 #include "chrome/browser/ui/gtk/apps/native_app_window_gtk.h"
6 6
7 #include <gdk/gdkx.h> 7 #include <gdk/gdkx.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/message_loop/message_pump_gtk.h" 10 #include "base/message_loop/message_pump_gtk.h"
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 661
662 void NativeAppWindowGtk::HandleKeyboardEvent( 662 void NativeAppWindowGtk::HandleKeyboardEvent(
663 const content::NativeWebKeyboardEvent& event) { 663 const content::NativeWebKeyboardEvent& event) {
664 // No-op. 664 // No-op.
665 } 665 }
666 666
667 bool NativeAppWindowGtk::IsFrameless() const { 667 bool NativeAppWindowGtk::IsFrameless() const {
668 return frameless_; 668 return frameless_;
669 } 669 }
670 670
671 bool NativeAppWindowGtk::HasFrameColor() const {
672 return false;
673 }
674
675 SkColor NativeAppWindowGtk::FrameColor() const {
676 return SkColor();
677 }
678
671 gfx::Insets NativeAppWindowGtk::GetFrameInsets() const { 679 gfx::Insets NativeAppWindowGtk::GetFrameInsets() const {
672 if (frameless_) 680 if (frameless_)
673 return gfx::Insets(); 681 return gfx::Insets();
674 GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(window_)); 682 GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(window_));
675 if (!gdk_window) 683 if (!gdk_window)
676 return gfx::Insets(); 684 return gfx::Insets();
677 685
678 gint current_width = 0; 686 gint current_width = 0;
679 gint current_height = 0; 687 gint current_height = 0;
680 gtk_window_get_size(window_, &current_width, &current_height); 688 gtk_window_get_size(window_, &current_width, &current_height);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 hints_mask |= GDK_HINT_MAX_SIZE; 724 hints_mask |= GDK_HINT_MAX_SIZE;
717 } 725 }
718 if (hints_mask) { 726 if (hints_mask) {
719 gtk_window_set_geometry_hints( 727 gtk_window_set_geometry_hints(
720 window_, 728 window_,
721 GTK_WIDGET(window_), 729 GTK_WIDGET(window_),
722 &hints, 730 &hints,
723 static_cast<GdkWindowHints>(hints_mask)); 731 static_cast<GdkWindowHints>(hints_mask));
724 } 732 }
725 } 733 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/apps/native_app_window_gtk.h ('k') | chrome/browser/ui/views/apps/native_app_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698