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

Side by Side Diff: ash/shell/content_client/shell_browser_main_parts.cc

Issue 108193005: Fixing opacity for browser frame window on ASH/Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ChromeOS build changes Created 7 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/chrome_views_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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 {
63 if (params->opacity == views::Widget::InitParams::INFER_OPACITY)
64 params->opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
65
67 if (params->native_widget) 66 if (params->native_widget)
68 return; 67 return;
69 68
70 if (!params->parent && !params->context && params->top_level) 69 if (!params->parent && !params->context && params->top_level)
71 params->context = Shell::GetPrimaryRootWindow(); 70 params->context = Shell::GetPrimaryRootWindow();
72 } 71 }
73 72
74 private: 73 private:
75 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegate); 74 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegate);
76 }; 75 };
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 browser_context_.reset(); 161 browser_context_.reset();
163 } 162 }
164 163
165 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { 164 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
166 base::MessageLoopForUI::current()->Run(); 165 base::MessageLoopForUI::current()->Run();
167 return true; 166 return true;
168 } 167 }
169 168
170 } // namespace shell 169 } // namespace shell
171 } // namespace ash 170 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/chrome_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698