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

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

Issue 10822004: Draggable region support for frameless app window on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback 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
Index: chrome/browser/ui/views/extensions/shell_window_views.h
diff --git a/chrome/browser/ui/views/extensions/shell_window_views.h b/chrome/browser/ui/views/extensions/shell_window_views.h
index daea5613fa34f4b086bdf444c7c8e22fbf572a44..16fdaf224d229800a0e637bd8d064e9e9d03a99c 100644
--- a/chrome/browser/ui/views/extensions/shell_window_views.h
+++ b/chrome/browser/ui/views/extensions/shell_window_views.h
@@ -14,6 +14,7 @@ class Profile;
namespace extensions {
class Extension;
+struct DraggableRegion;
}
namespace views {
@@ -28,6 +29,9 @@ class ShellWindowViews : public ShellWindow,
const GURL& url,
const CreateParams& params);
+ bool frameless() const { return frameless_; }
+ SkRegion* draggable_region() { return draggable_region_.Get(); }
+
// BaseWindow implementation.
virtual bool IsActive() const OVERRIDE;
virtual bool IsMaximized() const OVERRIDE;
@@ -45,7 +49,6 @@ class ShellWindowViews : public ShellWindow,
virtual void Minimize() OVERRIDE;
virtual void Restore() OVERRIDE;
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
- virtual void SetDraggableRegion(SkRegion* region) OVERRIDE;
virtual void FlashFrame(bool flash) OVERRIDE;
virtual bool IsAlwaysOnTop() const OVERRIDE;
@@ -80,15 +83,19 @@ class ShellWindowViews : public ShellWindow,
virtual ~ShellWindowViews();
+ // content::WebContentsDelegate implementation.
+ virtual void UpdateDraggableRegions(
+ const std::vector<extensions::DraggableRegion>& regions) OVERRIDE;
+
void OnViewWasResized();
views::WebView* web_view_;
views::Widget* window_;
bool is_fullscreen_;
- gfx::ScopedSkRegion caption_region_;
+ gfx::ScopedSkRegion draggable_region_;
- bool use_custom_frame_;
+ bool frameless_;
gfx::Size minimum_size_;
gfx::Size maximum_size_;

Powered by Google App Engine
This is Rietveld 408576698