| OLD | NEW |
| 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 "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/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 FullscreenExitBubbleViews* bubble, | 126 FullscreenExitBubbleViews* bubble, |
| 127 const base::string16& accelerator, | 127 const base::string16& accelerator, |
| 128 const GURL& url, | 128 const GURL& url, |
| 129 FullscreenExitBubbleType bubble_type) | 129 FullscreenExitBubbleType bubble_type) |
| 130 : bubble_(bubble), | 130 : bubble_(bubble), |
| 131 link_(NULL), | 131 link_(NULL), |
| 132 mouse_lock_exit_instruction_(NULL), | 132 mouse_lock_exit_instruction_(NULL), |
| 133 message_label_(NULL), | 133 message_label_(NULL), |
| 134 button_view_(NULL), | 134 button_view_(NULL), |
| 135 browser_fullscreen_exit_accelerator_(accelerator) { | 135 browser_fullscreen_exit_accelerator_(accelerator) { |
| 136 views::BubbleBorder* bubble_border = new views::BubbleBorder( | 136 scoped_ptr<views::BubbleBorder> bubble_border( |
| 137 views::BubbleBorder::NONE, views::BubbleBorder::BIG_SHADOW, | 137 new views::BubbleBorder(views::BubbleBorder::NONE, |
| 138 SK_ColorWHITE); | 138 views::BubbleBorder::BIG_SHADOW, |
| 139 set_background(new views::BubbleBackground(bubble_border)); | 139 SK_ColorWHITE)); |
| 140 set_border(bubble_border); | 140 set_background(new views::BubbleBackground(bubble_border.get())); |
| 141 SetBorder(bubble_border.PassAs<views::Border>()); |
| 141 SetFocusable(false); | 142 SetFocusable(false); |
| 142 | 143 |
| 143 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 144 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 144 const gfx::FontList& medium_font_list = | 145 const gfx::FontList& medium_font_list = |
| 145 rb.GetFontList(ui::ResourceBundle::MediumFont); | 146 rb.GetFontList(ui::ResourceBundle::MediumFont); |
| 146 message_label_ = new views::Label(base::string16(), medium_font_list); | 147 message_label_ = new views::Label(base::string16(), medium_font_list); |
| 147 | 148 |
| 148 mouse_lock_exit_instruction_ = | 149 mouse_lock_exit_instruction_ = |
| 149 new views::Label(bubble_->GetInstructionText(), medium_font_list); | 150 new views::Label(bubble_->GetInstructionText(), medium_font_list); |
| 150 mouse_lock_exit_instruction_->set_collapse_when_hidden(true); | 151 mouse_lock_exit_instruction_->set_collapse_when_hidden(true); |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 const content::NotificationDetails& details) { | 506 const content::NotificationDetails& details) { |
| 506 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); | 507 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); |
| 507 UpdateForImmersiveState(); | 508 UpdateForImmersiveState(); |
| 508 } | 509 } |
| 509 | 510 |
| 510 void FullscreenExitBubbleViews::OnWidgetVisibilityChanged( | 511 void FullscreenExitBubbleViews::OnWidgetVisibilityChanged( |
| 511 views::Widget* widget, | 512 views::Widget* widget, |
| 512 bool visible) { | 513 bool visible) { |
| 513 UpdateMouseWatcher(); | 514 UpdateMouseWatcher(); |
| 514 } | 515 } |
| OLD | NEW |