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

Side by Side 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: Patch 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_
7 7
8 #include "chrome/browser/ui/extensions/shell_window.h" 8 #include "chrome/browser/ui/extensions/shell_window.h"
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 #include "ui/gfx/scoped_sk_region.h" 10 #include "ui/gfx/scoped_sk_region.h"
(...skipping 27 matching lines...) Expand all
38 virtual gfx::Rect GetBounds() const OVERRIDE; 38 virtual gfx::Rect GetBounds() const OVERRIDE;
39 virtual void Show() OVERRIDE; 39 virtual void Show() OVERRIDE;
40 virtual void ShowInactive() OVERRIDE; 40 virtual void ShowInactive() OVERRIDE;
41 virtual void Close() OVERRIDE; 41 virtual void Close() OVERRIDE;
42 virtual void Activate() OVERRIDE; 42 virtual void Activate() OVERRIDE;
43 virtual void Deactivate() OVERRIDE; 43 virtual void Deactivate() OVERRIDE;
44 virtual void Maximize() OVERRIDE; 44 virtual void Maximize() OVERRIDE;
45 virtual void Minimize() OVERRIDE; 45 virtual void Minimize() OVERRIDE;
46 virtual void Restore() OVERRIDE; 46 virtual void Restore() OVERRIDE;
47 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 47 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
48 virtual void SetDraggableRegion(SkRegion* region) OVERRIDE;
49 virtual void FlashFrame(bool flash) OVERRIDE; 48 virtual void FlashFrame(bool flash) OVERRIDE;
50 virtual bool IsAlwaysOnTop() const OVERRIDE; 49 virtual bool IsAlwaysOnTop() const OVERRIDE;
51 50
52 // WidgetDelegate implementation. 51 // WidgetDelegate implementation.
53 virtual views::View* GetContentsView() OVERRIDE; 52 virtual views::View* GetContentsView() OVERRIDE;
54 virtual views::NonClientFrameView* CreateNonClientFrameView( 53 virtual views::NonClientFrameView* CreateNonClientFrameView(
55 views::Widget* widget) OVERRIDE; 54 views::Widget* widget) OVERRIDE;
56 virtual bool CanResize() const OVERRIDE; 55 virtual bool CanResize() const OVERRIDE;
57 virtual bool CanMaximize() const OVERRIDE; 56 virtual bool CanMaximize() const OVERRIDE;
58 virtual views::Widget* GetWidget() OVERRIDE; 57 virtual views::Widget* GetWidget() OVERRIDE;
59 virtual const views::Widget* GetWidget() const OVERRIDE; 58 virtual const views::Widget* GetWidget() const OVERRIDE;
60 virtual string16 GetWindowTitle() const OVERRIDE; 59 virtual string16 GetWindowTitle() const OVERRIDE;
61 virtual void DeleteDelegate() OVERRIDE; 60 virtual void DeleteDelegate() OVERRIDE;
62 virtual views::View* GetInitiallyFocusedView() OVERRIDE; 61 virtual views::View* GetInitiallyFocusedView() OVERRIDE;
63 62
63 bool frameless() const { return frameless_; }
64 SkRegion* draggable_region() { return draggable_region_.Get(); }
Ben Goodger (Google) 2012/08/07 18:03:52 move these above the interface impls above.
jianli 2012/08/07 20:38:06 Done.
65
64 protected: 66 protected:
65 // views::View implementation. 67 // views::View implementation.
66 virtual void Layout() OVERRIDE; 68 virtual void Layout() OVERRIDE;
67 virtual void ViewHierarchyChanged( 69 virtual void ViewHierarchyChanged(
68 bool is_add, views::View *parent, views::View *child) OVERRIDE; 70 bool is_add, views::View *parent, views::View *child) OVERRIDE;
69 virtual gfx::Size GetMinimumSize() OVERRIDE; 71 virtual gfx::Size GetMinimumSize() OVERRIDE;
70 virtual gfx::Size GetMaximumSize() OVERRIDE; 72 virtual gfx::Size GetMaximumSize() OVERRIDE;
71 virtual void OnFocus() OVERRIDE; 73 virtual void OnFocus() OVERRIDE;
72 74
73 // ShellWindow implementation. 75 // ShellWindow implementation.
74 virtual void UpdateWindowTitle() OVERRIDE; 76 virtual void UpdateWindowTitle() OVERRIDE;
75 virtual void SetFullscreen(bool fullscreen) OVERRIDE; 77 virtual void SetFullscreen(bool fullscreen) OVERRIDE;
76 virtual bool IsFullscreenOrPending() const OVERRIDE; 78 virtual bool IsFullscreenOrPending() const OVERRIDE;
77 79
78 private: 80 private:
79 friend class ShellWindowFrameView; 81 friend class ShellWindowFrameView;
80 82
81 virtual ~ShellWindowViews(); 83 virtual ~ShellWindowViews();
82 84
85 // content::WebContentsDelegate implementation.
86 virtual void UpdateDraggableRegions(
87 const std::vector<content::DraggableRegion>& regions) OVERRIDE;
88
83 void OnViewWasResized(); 89 void OnViewWasResized();
84 90
85 views::WebView* web_view_; 91 views::WebView* web_view_;
86 views::Widget* window_; 92 views::Widget* window_;
87 bool is_fullscreen_; 93 bool is_fullscreen_;
88 94
89 gfx::ScopedSkRegion caption_region_; 95 gfx::ScopedSkRegion draggable_region_;
90 96
91 bool use_custom_frame_; 97 bool frameless_;
92 gfx::Size minimum_size_; 98 gfx::Size minimum_size_;
93 gfx::Size maximum_size_; 99 gfx::Size maximum_size_;
94 100
95 DISALLOW_COPY_AND_ASSIGN(ShellWindowViews); 101 DISALLOW_COPY_AND_ASSIGN(ShellWindowViews);
96 }; 102 };
97 103
98 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ 104 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698