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

Unified Diff: ash/shell/shell_main.cc

Issue 9166014: Allow a Views client to provide a default frameview for window widgets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | « ash/shell.cc ('k') | ash/wm/dialog_frame_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/shell_main.cc
===================================================================
--- ash/shell/shell_main.cc (revision 117168)
+++ ash/shell/shell_main.cc (working copy)
@@ -26,6 +26,21 @@
namespace {
+class ShellViewsDelegate : public views::TestViewsDelegate {
+ public:
+ ShellViewsDelegate() {}
+ virtual ~ShellViewsDelegate() {}
+
+ // Overridden from views::TestViewsDelegate:
+ virtual views::NonClientFrameView* CreateDefaultNonClientFrameView(
+ views::Widget* widget) OVERRIDE {
+ return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(widget);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegate);
+};
+
class ShellDelegateImpl : public ash::ShellDelegate {
public:
ShellDelegateImpl() {
@@ -116,7 +131,7 @@
// A ViewsDelegate is required.
if (!views::ViewsDelegate::views_delegate)
- views::ViewsDelegate::views_delegate = new views::TestViewsDelegate;
+ views::ViewsDelegate::views_delegate = new ShellViewsDelegate;
ash::Shell::CreateInstance(new ShellDelegateImpl);
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/dialog_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698