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 "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 FullscreenExitBubbleViews::FullscreenExitView::FullscreenExitView( | 69 FullscreenExitBubbleViews::FullscreenExitView::FullscreenExitView( |
70 FullscreenExitBubbleViews* bubble, | 70 FullscreenExitBubbleViews* bubble, |
71 const string16& accelerator, | 71 const string16& accelerator, |
72 const GURL& url, | 72 const GURL& url, |
73 FullscreenExitBubbleType bubble_type) | 73 FullscreenExitBubbleType bubble_type) |
74 : bubble_(bubble), | 74 : bubble_(bubble), |
75 accept_button_(NULL), | 75 accept_button_(NULL), |
76 deny_button_(NULL), | 76 deny_button_(NULL), |
77 browser_fullscreen_exit_accelerator_(accelerator) { | 77 browser_fullscreen_exit_accelerator_(accelerator) { |
78 views::BubbleBorder* bubble_border = | 78 views::BubbleBorder* bubble_border = |
79 new views::BubbleBorder(views::BubbleBorder::NONE); | 79 new views::BubbleBorder(views::BubbleBorder::NONE, |
| 80 views::BubbleBorder::SHADOW); |
80 set_background(new views::BubbleBackground(bubble_border)); | 81 set_background(new views::BubbleBackground(bubble_border)); |
81 set_border(bubble_border); | 82 set_border(bubble_border); |
82 set_focusable(false); | 83 set_focusable(false); |
83 | 84 |
84 message_label_.set_parent_owned(false); | 85 message_label_.set_parent_owned(false); |
85 message_label_.SetFont(ResourceBundle::GetSharedInstance().GetFont( | 86 message_label_.SetFont(ResourceBundle::GetSharedInstance().GetFont( |
86 ResourceBundle::MediumFont)); | 87 ResourceBundle::MediumFont)); |
87 | 88 |
88 mouse_lock_exit_instruction_.set_parent_owned(false); | 89 mouse_lock_exit_instruction_.set_parent_owned(false); |
89 mouse_lock_exit_instruction_.SetText(bubble_->GetInstructionText()); | 90 mouse_lock_exit_instruction_.SetText(bubble_->GetInstructionText()); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 size.set_height(size.height() - popup_bottom + y_offset); | 378 size.set_height(size.height() - popup_bottom + y_offset); |
378 origin.set_y(origin.y() - y_offset); | 379 origin.set_y(origin.y() - y_offset); |
379 } | 380 } |
380 return gfx::Rect(origin, size); | 381 return gfx::Rect(origin, size); |
381 } | 382 } |
382 | 383 |
383 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() { | 384 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() { |
384 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_)) | 385 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_)) |
385 StartWatchingMouse(); | 386 StartWatchingMouse(); |
386 } | 387 } |
OLD | NEW |