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

Side by Side Diff: ash/wm/overview/window_selector_item.cc

Issue 286733002: [Refactor] Consolidate the logic for whether a widget can be activated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « ash/wm/overview/window_overview.cc ('k') | ash/wm/overview/window_selector_window.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/wm/overview/window_selector_item.h" 5 #include "ash/wm/overview/window_selector_item.h"
6 6
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/overview/scoped_transform_overview_window.h" 10 #include "ash/wm/overview/scoped_transform_overview_window.h"
(...skipping 24 matching lines...) Expand all
35 static const int kVerticalShadowOffset = 1; 35 static const int kVerticalShadowOffset = 1;
36 36
37 // Amount of blur applied to the label shadow 37 // Amount of blur applied to the label shadow
38 static const int kShadowBlur = 10; 38 static const int kShadowBlur = 10;
39 39
40 views::Widget* CreateWindowLabel(aura::Window* root_window, 40 views::Widget* CreateWindowLabel(aura::Window* root_window,
41 const base::string16 title) { 41 const base::string16 title) {
42 views::Widget* widget = new views::Widget; 42 views::Widget* widget = new views::Widget;
43 views::Widget::InitParams params; 43 views::Widget::InitParams params;
44 params.type = views::Widget::InitParams::TYPE_POPUP; 44 params.type = views::Widget::InitParams::TYPE_POPUP;
45 params.can_activate = false;
46 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 45 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
47 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 46 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
48 params.parent = 47 params.parent =
49 Shell::GetContainer(root_window, ash::kShellWindowId_OverlayContainer); 48 Shell::GetContainer(root_window, ash::kShellWindowId_OverlayContainer);
50 params.accept_events = false; 49 params.accept_events = false;
51 params.visible_on_all_workspaces = true; 50 params.visible_on_all_workspaces = true;
52 widget->set_focus_on_creation(false); 51 widget->set_focus_on_creation(false);
53 widget->Init(params); 52 widget->Init(params);
54 views::Label* label = new views::Label; 53 views::Label* label = new views::Label;
55 label->SetEnabledColor(kLabelColor); 54 label->SetEnabledColor(kLabelColor);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 ScopedTransformOverviewWindow::kTransitionMilliseconds)); 151 ScopedTransformOverviewWindow::kTransitionMilliseconds));
153 window_label_->GetNativeWindow()->SetBounds(label_bounds); 152 window_label_->GetNativeWindow()->SetBounds(label_bounds);
154 } else { 153 } else {
155 window_label_->GetNativeWindow()->SetBounds(label_bounds); 154 window_label_->GetNativeWindow()->SetBounds(label_bounds);
156 } 155 }
157 } 156 }
158 157
159 } 158 }
160 159
161 } // namespace ash 160 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_overview.cc ('k') | ash/wm/overview/window_selector_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698