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

Side by Side Diff: ash/popup_message.cc

Issue 29263007: linux and chromeos: Turn on -Wunused-const-variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 2 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
« no previous file with comments | « ash/launcher/launcher_button.cc ('k') | ash/shelf/app_list_button.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/popup_message.h" 5 #include "ash/popup_message.h"
6 6
7 #include "ash/wm/window_animations.h" 7 #include "ash/wm/window_animations.h"
8 #include "grit/ash_resources.h" 8 #include "grit/ash_resources.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/insets.h" 10 #include "ui/gfx/insets.h"
11 #include "ui/views/bubble/bubble_delegate.h" 11 #include "ui/views/bubble/bubble_delegate.h"
12 #include "ui/views/bubble/bubble_frame_view.h" 12 #include "ui/views/bubble/bubble_frame_view.h"
13 #include "ui/views/controls/image_view.h" 13 #include "ui/views/controls/image_view.h"
14 #include "ui/views/controls/label.h" 14 #include "ui/views/controls/label.h"
15 #include "ui/views/layout/box_layout.h" 15 #include "ui/views/layout/box_layout.h"
16 #include "ui/views/widget/widget.h" 16 #include "ui/views/widget/widget.h"
17 17
18 namespace ash { 18 namespace ash {
19 namespace { 19 namespace {
20 const int kMessageTopBottomMargin = 10; 20 const int kMessageTopBottomMargin = 10;
21 const int kMessageLeftRightMargin = 10; 21 const int kMessageLeftRightMargin = 10;
22 const int kMessageAppearanceDelayMs = 200;
23 const int kMessageMinHeight = 29 - 2 * kMessageTopBottomMargin; 22 const int kMessageMinHeight = 29 - 2 * kMessageTopBottomMargin;
24 const SkColor kMessageTextColor = SkColorSetRGB(0x22, 0x22, 0x22); 23 const SkColor kMessageTextColor = SkColorSetRGB(0x22, 0x22, 0x22);
25 24
26 // The maximum width of the Message bubble. Borrowed the value from 25 // The maximum width of the Message bubble. Borrowed the value from
27 // ash/message/message_controller.cc 26 // ash/message/message_controller.cc
28 const int kMessageMaxWidth = 250; 27 const int kMessageMaxWidth = 250;
29 28
30 // The offset for the Message bubble - making sure that the bubble is flush 29 // The offset for the Message bubble - making sure that the bubble is flush
31 // with the shelf. The offset includes the arrow size in pixels as well as 30 // with the shelf. The offset includes the arrow size in pixels as well as
32 // the activation bar and other spacing elements. 31 // the activation bar and other spacing elements.
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 void PopupMessage::CancelHidingAnimation() { 216 void PopupMessage::CancelHidingAnimation() {
218 if (!widget_ || !widget_->GetNativeView()) 217 if (!widget_ || !widget_->GetNativeView())
219 return; 218 return;
220 219
221 gfx::NativeView native_view = widget_->GetNativeView(); 220 gfx::NativeView native_view = widget_->GetNativeView();
222 views::corewm::SetWindowVisibilityAnimationTransition( 221 views::corewm::SetWindowVisibilityAnimationTransition(
223 native_view, views::corewm::ANIMATE_NONE); 222 native_view, views::corewm::ANIMATE_NONE);
224 } 223 }
225 224
226 } // namespace ash 225 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_button.cc ('k') | ash/shelf/app_list_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698