Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "ash/shell/content_client/shell_browser_main_parts.h" | 5 #include "ash/shell/content_client/shell_browser_main_parts.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell/shell_delegate_impl.h" | 10 #include "ash/shell/shell_delegate_impl.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 class ShellViewsDelegate : public views::TestViewsDelegate { | 50 class ShellViewsDelegate : public views::TestViewsDelegate { |
| 51 public: | 51 public: |
| 52 ShellViewsDelegate() {} | 52 ShellViewsDelegate() {} |
| 53 virtual ~ShellViewsDelegate() {} | 53 virtual ~ShellViewsDelegate() {} |
| 54 | 54 |
| 55 // Overridden from views::TestViewsDelegate: | 55 // Overridden from views::TestViewsDelegate: |
| 56 virtual views::NonClientFrameView* CreateDefaultNonClientFrameView( | 56 virtual views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 57 views::Widget* widget) OVERRIDE { | 57 views::Widget* widget) OVERRIDE { |
| 58 return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(widget); | 58 return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(widget); |
| 59 } | 59 } |
| 60 virtual bool UseTransparentWindows() const OVERRIDE { | |
| 61 // Ash uses transparent window frames. | |
| 62 return true; | |
| 63 } | |
| 64 virtual void OnBeforeWidgetInit( | 60 virtual void OnBeforeWidgetInit( |
| 65 views::Widget::InitParams* params, | 61 views::Widget::InitParams* params, |
| 66 views::internal::NativeWidgetDelegate* delegate) OVERRIDE { | 62 views::internal::NativeWidgetDelegate* delegate) OVERRIDE { |
| 67 if (params->native_widget) | 63 if (params->native_widget) |
| 68 return; | 64 return; |
| 69 | 65 |
| 66 if (params->opacity == InitParams::INFER_OPACITY) { | |
| 67 if (use_transparent_windows_) | |
|
sky
2013/12/12 23:58:14
Where does use_transperent_windows_ come from? See
Shrikant Kelkar
2013/12/17 07:06:21
TestViewsDelegate defines a metod SetUseTransparen
| |
| 68 params->opacity = InitParams::TRANSLUCENT_WINDOW; | |
| 69 else | |
| 70 params->opacity = InitParams::OPAQUE_WINDOW; | |
| 71 } | |
| 72 | |
| 70 if (!params->parent && !params->context && params->top_level) | 73 if (!params->parent && !params->context && params->top_level) |
| 71 params->context = Shell::GetPrimaryRootWindow(); | 74 params->context = Shell::GetPrimaryRootWindow(); |
| 72 } | 75 } |
| 73 | 76 |
| 74 private: | 77 private: |
| 75 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegate); | 78 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegate); |
| 76 }; | 79 }; |
| 77 | 80 |
| 78 } // namespace | 81 } // namespace |
| 79 | 82 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 browser_context_.reset(); | 165 browser_context_.reset(); |
| 163 } | 166 } |
| 164 | 167 |
| 165 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { | 168 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { |
| 166 base::MessageLoopForUI::current()->Run(); | 169 base::MessageLoopForUI::current()->Run(); |
| 167 return true; | 170 return true; |
| 168 } | 171 } |
| 169 | 172 |
| 170 } // namespace shell | 173 } // namespace shell |
| 171 } // namespace ash | 174 } // namespace ash |
| OLD | NEW |