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

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_view.cc

Issue 7057014: Variety of tweaks to View API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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) 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/infobars/infobar_view.h" 5 #include "chrome/browser/ui/views/infobars/infobar_view.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/browser/tab_contents/infobar_delegate.h" 9 #include "chrome/browser/tab_contents/infobar_delegate.h"
10 #include "chrome/browser/ui/views/infobars/infobar_background.h" 10 #include "chrome/browser/ui/views/infobars/infobar_background.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 close_button_ = new views::ImageButton(this); 242 close_button_ = new views::ImageButton(this);
243 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 243 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
244 close_button_->SetImage(views::CustomButton::BS_NORMAL, 244 close_button_->SetImage(views::CustomButton::BS_NORMAL,
245 rb.GetBitmapNamed(IDR_CLOSE_BAR)); 245 rb.GetBitmapNamed(IDR_CLOSE_BAR));
246 close_button_->SetImage(views::CustomButton::BS_HOT, 246 close_button_->SetImage(views::CustomButton::BS_HOT,
247 rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); 247 rb.GetBitmapNamed(IDR_CLOSE_BAR_H));
248 close_button_->SetImage(views::CustomButton::BS_PUSHED, 248 close_button_->SetImage(views::CustomButton::BS_PUSHED,
249 rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); 249 rb.GetBitmapNamed(IDR_CLOSE_BAR_P));
250 close_button_->SetAccessibleName( 250 close_button_->SetAccessibleName(
251 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); 251 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE));
252 close_button_->SetFocusable(true); 252 close_button_->set_focusable(true);
253 AddChildView(close_button_); 253 AddChildView(close_button_);
254 } 254 }
255 } else { 255 } else {
256 DestroyFocusTracker(false); 256 DestroyFocusTracker(false);
257 animation()->Stop(); 257 animation()->Stop();
258 // Finally, clean ourselves up when we're removed from the view hierarchy 258 // Finally, clean ourselves up when we're removed from the view hierarchy
259 // since no-one refers to us now. 259 // since no-one refers to us now.
260 MessageLoop::current()->PostTask(FROM_HERE, 260 MessageLoop::current()->PostTask(FROM_HERE,
261 delete_factory_.NewRunnableMethod(&InfoBarView::DeleteSelf)); 261 delete_factory_.NewRunnableMethod(&InfoBarView::DeleteSelf));
262 if (GetFocusManager()) 262 if (GetFocusManager())
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 if (restore_focus) 369 if (restore_focus)
370 focus_tracker_->FocusLastFocusedExternalView(); 370 focus_tracker_->FocusLastFocusedExternalView();
371 focus_tracker_->SetFocusManager(NULL); 371 focus_tracker_->SetFocusManager(NULL);
372 focus_tracker_.reset(); 372 focus_tracker_.reset();
373 } 373 }
374 } 374 }
375 375
376 void InfoBarView::DeleteSelf() { 376 void InfoBarView::DeleteSelf() {
377 delete this; 377 delete this;
378 } 378 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_container_view.cc ('k') | chrome/browser/ui/views/location_bar/keyword_hint_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698