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

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

Issue 103493005: Rename View::set_focusable and View::set_accessibility_focusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a few missing files Created 7 years 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/infobars/extension_infobar.h" 5 #include "chrome/browser/ui/views/infobars/extension_infobar.h"
6 6
7 #include "chrome/browser/extensions/extension_context_menu_model.h" 7 #include "chrome/browser/extensions/extension_context_menu_model.h"
8 #include "chrome/browser/extensions/extension_infobar_delegate.h" 8 #include "chrome/browser/extensions/extension_infobar_delegate.h"
9 #include "chrome/browser/extensions/extension_view_host.h" 9 #include "chrome/browser/extensions/extension_view_host.h"
10 #include "chrome/browser/extensions/image_loader.h" 10 #include "chrome/browser/extensions/image_loader.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 if (!details.is_add || (details.child != this) || (infobar_icon_ != NULL)) { 116 if (!details.is_add || (details.child != this) || (infobar_icon_ != NULL)) {
117 InfoBarView::ViewHierarchyChanged(details); 117 InfoBarView::ViewHierarchyChanged(details);
118 return; 118 return;
119 } 119 }
120 120
121 extensions::ExtensionViewHost* extension_view_host = 121 extensions::ExtensionViewHost* extension_view_host =
122 GetDelegate()->extension_view_host(); 122 GetDelegate()->extension_view_host();
123 123
124 if (extension_view_host->extension()->ShowConfigureContextMenus()) { 124 if (extension_view_host->extension()->ShowConfigureContextMenus()) {
125 icon_as_menu_ = new views::MenuButton(NULL, base::string16(), this, false); 125 icon_as_menu_ = new views::MenuButton(NULL, base::string16(), this, false);
126 icon_as_menu_->set_focusable(true); 126 icon_as_menu_->SetFocusable(true);
127 infobar_icon_ = icon_as_menu_; 127 infobar_icon_ = icon_as_menu_;
128 } else { 128 } else {
129 icon_as_image_ = new views::ImageView(); 129 icon_as_image_ = new views::ImageView();
130 infobar_icon_ = icon_as_image_; 130 infobar_icon_ = icon_as_image_;
131 } 131 }
132 132
133 // Wait until the icon image is loaded before showing it. 133 // Wait until the icon image is loaded before showing it.
134 infobar_icon_->SetVisible(false); 134 infobar_icon_->SetVisible(false);
135 AddChildView(infobar_icon_); 135 AddChildView(infobar_icon_);
136 136
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 infobar_icon_->SetVisible(true); 206 infobar_icon_->SetVisible(true);
207 207
208 Layout(); 208 Layout();
209 } 209 }
210 210
211 ExtensionInfoBarDelegate* ExtensionInfoBar::GetDelegate() { 211 ExtensionInfoBarDelegate* ExtensionInfoBar::GetDelegate() {
212 return delegate()->AsExtensionInfoBarDelegate(); 212 return delegate()->AsExtensionInfoBarDelegate();
213 } 213 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/fullscreen_exit_bubble_views.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698