OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/views/fullscreen_exit_bubble_views.h" | 5 #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/ui/views/bubble/bubble.h" | 10 #include "chrome/browser/ui/views/bubble/bubble.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 FullscreenExitBubbleViews::FullscreenExitView::FullscreenExitView( | 67 FullscreenExitBubbleViews::FullscreenExitView::FullscreenExitView( |
68 FullscreenExitBubbleViews* bubble, | 68 FullscreenExitBubbleViews* bubble, |
69 const string16& accelerator, | 69 const string16& accelerator, |
70 const GURL& url, | 70 const GURL& url, |
71 FullscreenExitBubbleType bubble_type) | 71 FullscreenExitBubbleType bubble_type) |
72 : bubble_(bubble), | 72 : bubble_(bubble), |
73 accept_button_(NULL), | 73 accept_button_(NULL), |
74 deny_button_(NULL) { | 74 deny_button_(NULL) { |
75 views::BubbleBorder* bubble_border = | 75 views::BubbleBorder* bubble_border = |
76 new views::BubbleBorder(views::BubbleBorder::NONE); | 76 new views::BubbleBorder(views::BubbleBorder::NONE, |
| 77 views::BubbleBorder::SHADOW); |
77 bubble_border->set_background_color(Bubble::kBackgroundColor); | 78 bubble_border->set_background_color(Bubble::kBackgroundColor); |
78 set_background(new views::BubbleBackground(bubble_border)); | 79 set_background(new views::BubbleBackground(bubble_border)); |
79 set_border(bubble_border); | 80 set_border(bubble_border); |
80 set_focusable(false); | 81 set_focusable(false); |
81 | 82 |
82 message_label_.set_parent_owned(false); | 83 message_label_.set_parent_owned(false); |
83 message_label_.SetFont(ResourceBundle::GetSharedInstance().GetFont( | 84 message_label_.SetFont(ResourceBundle::GetSharedInstance().GetFont( |
84 ResourceBundle::MediumFont)); | 85 ResourceBundle::MediumFont)); |
85 | 86 |
86 instruction_label_.set_parent_owned(false); | 87 instruction_label_.set_parent_owned(false); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 size.set_height(size.height() - popup_bottom + y_offset); | 362 size.set_height(size.height() - popup_bottom + y_offset); |
362 origin.set_y(origin.y() - y_offset); | 363 origin.set_y(origin.y() - y_offset); |
363 } | 364 } |
364 return gfx::Rect(origin, size); | 365 return gfx::Rect(origin, size); |
365 } | 366 } |
366 | 367 |
367 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() { | 368 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() { |
368 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_)) | 369 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_)) |
369 StartWatchingMouse(); | 370 StartWatchingMouse(); |
370 } | 371 } |
OLD | NEW |