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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 scoped_ptr<views::BubbleBorder> bubble_border( | 136 scoped_ptr<views::BubbleBorder> bubble_border( |
137 new views::BubbleBorder(views::BubbleBorder::NONE, | 137 new views::BubbleBorder(views::BubbleBorder::NONE, |
138 views::BubbleBorder::BIG_SHADOW, | 138 views::BubbleBorder::BIG_SHADOW, |
139 SK_ColorWHITE)); | 139 SK_ColorWHITE)); |
140 set_background(new views::BubbleBackground(bubble_border.get())); | 140 set_background(new views::BubbleBackground(bubble_border.get())); |
141 SetBorder(bubble_border.PassAs<views::Border>()); | 141 SetBorder(bubble_border.Pass()); |
142 SetFocusable(false); | 142 SetFocusable(false); |
143 | 143 |
144 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 144 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
145 const gfx::FontList& medium_font_list = | 145 const gfx::FontList& medium_font_list = |
146 rb.GetFontList(ui::ResourceBundle::MediumFont); | 146 rb.GetFontList(ui::ResourceBundle::MediumFont); |
147 message_label_ = new views::Label(base::string16(), medium_font_list); | 147 message_label_ = new views::Label(base::string16(), medium_font_list); |
148 | 148 |
149 mouse_lock_exit_instruction_ = | 149 mouse_lock_exit_instruction_ = |
150 new views::Label(bubble_->GetInstructionText(), medium_font_list); | 150 new views::Label(bubble_->GetInstructionText(), medium_font_list); |
151 mouse_lock_exit_instruction_->set_collapse_when_hidden(true); | 151 mouse_lock_exit_instruction_->set_collapse_when_hidden(true); |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 const content::NotificationDetails& details) { | 505 const content::NotificationDetails& details) { |
506 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); | 506 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); |
507 UpdateForImmersiveState(); | 507 UpdateForImmersiveState(); |
508 } | 508 } |
509 | 509 |
510 void FullscreenExitBubbleViews::OnWidgetVisibilityChanged( | 510 void FullscreenExitBubbleViews::OnWidgetVisibilityChanged( |
511 views::Widget* widget, | 511 views::Widget* widget, |
512 bool visible) { | 512 bool visible) { |
513 UpdateMouseWatcher(); | 513 UpdateMouseWatcher(); |
514 } | 514 } |
OLD | NEW |