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

Side by Side Diff: chrome/browser/ui/views/fullscreen_exit_bubble_views.cc

Issue 12096084: Cleanup BubbleFrameView and BubbleBorder construction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional refactoring and cleanup. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
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.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 "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 FullscreenExitBubbleViews* bubble, 114 FullscreenExitBubbleViews* bubble,
115 const string16& accelerator, 115 const string16& accelerator,
116 const GURL& url, 116 const GURL& url,
117 FullscreenExitBubbleType bubble_type) 117 FullscreenExitBubbleType bubble_type)
118 : bubble_(bubble), 118 : bubble_(bubble),
119 link_(NULL), 119 link_(NULL),
120 mouse_lock_exit_instruction_(NULL), 120 mouse_lock_exit_instruction_(NULL),
121 message_label_(NULL), 121 message_label_(NULL),
122 button_view_(NULL), 122 button_view_(NULL),
123 browser_fullscreen_exit_accelerator_(accelerator) { 123 browser_fullscreen_exit_accelerator_(accelerator) {
124 views::BubbleBorder* bubble_border = 124 views::BubbleBorder* bubble_border = new views::BubbleBorder(
125 new views::BubbleBorder(views::BubbleBorder::NONE, 125 views::BubbleBorder::NONE, views::BubbleBorder::SHADOW, SK_ColorWHITE);
126 views::BubbleBorder::SHADOW);
127 set_background(new views::BubbleBackground(bubble_border)); 126 set_background(new views::BubbleBackground(bubble_border));
128 set_border(bubble_border); 127 set_border(bubble_border);
129 set_focusable(false); 128 set_focusable(false);
130 129
131 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 130 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
132 message_label_ = new views::Label(); 131 message_label_ = new views::Label();
133 message_label_->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); 132 message_label_->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont));
134 133
135 mouse_lock_exit_instruction_ = new views::Label(); 134 mouse_lock_exit_instruction_ = new views::Label();
136 mouse_lock_exit_instruction_->set_collapse_when_hidden(true); 135 mouse_lock_exit_instruction_->set_collapse_when_hidden(true);
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 383 }
385 384
386 bool FullscreenExitBubbleViews::IsAnimating() { 385 bool FullscreenExitBubbleViews::IsAnimating() {
387 return size_animation_->GetCurrentValue() != 0; 386 return size_animation_->GetCurrentValue() != 0;
388 } 387 }
389 388
390 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() { 389 void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() {
391 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_)) 390 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_))
392 StartWatchingMouse(); 391 StartWatchingMouse();
393 } 392 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698