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

Unified Diff: chrome/browser/ui/views/extensions/shell_window_views.cc

Issue 10831361: Draggable region support for frameless app window on CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | ui/aura/window.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/shell_window_views.cc
diff --git a/chrome/browser/ui/views/extensions/shell_window_views.cc b/chrome/browser/ui/views/extensions/shell_window_views.cc
index 9a02a60ce2259c466cf23cf4134166010bd35db3..8060ee97431910f9389cffc5fdb4d613965547b2 100644
--- a/chrome/browser/ui/views/extensions/shell_window_views.cc
+++ b/chrome/browser/ui/views/extensions/shell_window_views.cc
@@ -492,10 +492,16 @@ const views::Widget* ShellWindowViews::GetWidget() const {
void ShellWindowViews::OnViewWasResized() {
// TODO(jeremya): this doesn't seem like a terribly elegant way to keep the
// window shape in sync.
-#if defined(OS_WIN) && !defined(USE_AURA)
- // Set the window shape of the RWHV.
DCHECK(window_);
DCHECK(web_view_);
+#if defined(USE_ASH)
+ if (draggable_region()) {
+ SkRegion* rgn = new SkRegion;
+ rgn->op(*draggable_region(), SkRegion::kUnion_Op);
+ GetNativeWindow()->SetDraggableRegion(rgn);
+ }
+#elif defined(OS_WIN)
+ // Set the window shape of the RWHV.
gfx::Size sz = web_view_->size();
int height = sz.height(), width = sz.width();
int radius = 1;
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | ui/aura/window.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698