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

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

Issue 27029006: apps: Move chrome's ShellWindowFrameView into apps/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 7 years, 2 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
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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 } 597 }
598 } else if (event->button == 2) { 598 } else if (event->button == 2) {
599 if (has_hit_titlebar || has_hit_edge) 599 if (has_hit_titlebar || has_hit_edge)
600 gdk_window_lower(gdk_window); 600 gdk_window_lower(gdk_window);
601 return TRUE; 601 return TRUE;
602 } 602 }
603 603
604 return FALSE; 604 return FALSE;
605 } 605 }
606 606
607 // NativeAppWindow implementation:
608
607 void NativeAppWindowGtk::SetFullscreen(bool fullscreen) { 609 void NativeAppWindowGtk::SetFullscreen(bool fullscreen) {
608 content_thinks_its_fullscreen_ = fullscreen; 610 content_thinks_its_fullscreen_ = fullscreen;
609 if (fullscreen){ 611 if (fullscreen){
610 if (resizable_) { 612 if (resizable_) {
611 gtk_window_fullscreen(window_); 613 gtk_window_fullscreen(window_);
612 } else { 614 } else {
613 // We must first make the window resizable. That won't take effect 615 // We must first make the window resizable. That won't take effect
614 // immediately, so OnConfigureDebounced completes the fullscreen call. 616 // immediately, so OnConfigureDebounced completes the fullscreen call.
615 gtk_window_set_resizable(window_, TRUE); 617 gtk_window_set_resizable(window_, TRUE);
616 } 618 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 } 660 }
659 661
660 void NativeAppWindowGtk::UpdateDraggableRegions( 662 void NativeAppWindowGtk::UpdateDraggableRegions(
661 const std::vector<extensions::DraggableRegion>& regions) { 663 const std::vector<extensions::DraggableRegion>& regions) {
662 // Draggable region is not supported for non-frameless window. 664 // Draggable region is not supported for non-frameless window.
663 if (!frameless_) 665 if (!frameless_)
664 return; 666 return;
665 667
666 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); 668 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions));
667 } 669 }
670
671 SkRegion* NativeAppWindowGtk::GetDraggableRegion() {
672 return draggable_region_.get();
673 }
674
675 bool NativeAppWindowGtk::IsFrameless() const {
676 return frameless_;
677 }
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