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

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

Issue 7834048: Preliminary work to allow Chrome to build with USE_AURA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 310 }
311 311
312 void InfoBarView::PlatformSpecificHide(bool animate) { 312 void InfoBarView::PlatformSpecificHide(bool animate) {
313 // It's possible to be called twice (once with |animate| true and once with it 313 // It's possible to be called twice (once with |animate| true and once with it
314 // false); in this case the second RemoveFocusChangeListener() call will 314 // false); in this case the second RemoveFocusChangeListener() call will
315 // silently no-op. 315 // silently no-op.
316 views::FocusManager* focus_manager = GetFocusManager(); 316 views::FocusManager* focus_manager = GetFocusManager();
317 if (focus_manager) 317 if (focus_manager)
318 focus_manager->RemoveFocusChangeListener(this); 318 focus_manager->RemoveFocusChangeListener(this);
319 319
320 #if defined(OS_WIN) 320 #if defined(OS_WIN) && !defined(USE_AURA)
321 if (!animate || !focus_tracker_.get()) 321 if (!animate || !focus_tracker_.get())
322 return; 322 return;
323 323
324 // Do not restore focus (and active state with it) if some other top-level 324 // Do not restore focus (and active state with it) if some other top-level
325 // window became active. 325 // window became active.
326 views::Widget* widget = GetWidget(); 326 views::Widget* widget = GetWidget();
327 if (!widget || ui::DoesWindowBelongToActiveWindow(widget->GetNativeView())) 327 if (!widget || ui::DoesWindowBelongToActiveWindow(widget->GetNativeView()))
328 focus_tracker_->FocusLastFocusedExternalView(); 328 focus_tracker_->FocusLastFocusedExternalView();
329 focus_tracker_.reset(); 329 focus_tracker_.reset();
330 #endif 330 #endif
(...skipping 20 matching lines...) Expand all
351 351
352 void InfoBarView::FocusWillChange(View* focused_before, View* focused_now) { 352 void InfoBarView::FocusWillChange(View* focused_before, View* focused_now) {
353 // This will trigger some screen readers to read the entire contents of this 353 // This will trigger some screen readers to read the entire contents of this
354 // infobar. 354 // infobar.
355 if (focused_before && focused_now && !Contains(focused_before) && 355 if (focused_before && focused_now && !Contains(focused_before) &&
356 Contains(focused_now) && GetWidget()) { 356 Contains(focused_now) && GetWidget()) {
357 GetWidget()->NotifyAccessibilityEvent( 357 GetWidget()->NotifyAccessibilityEvent(
358 this, ui::AccessibilityTypes::EVENT_ALERT, true); 358 this, ui::AccessibilityTypes::EVENT_ALERT, true);
359 } 359 }
360 } 360 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698