| OLD | NEW |
| 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 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 | 12 |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "chrome/browser/infobars/infobar_delegate.h" | 15 #include "chrome/browser/infobars/infobar_delegate.h" |
| 16 #include "chrome/browser/ui/views/infobars/infobar_background.h" | 16 #include "chrome/browser/ui/views/infobars/infobar_background.h" |
| 17 #include "chrome/browser/ui/views/infobars/infobar_button_border.h" | 17 #include "chrome/browser/ui/views/infobars/infobar_button_border.h" |
| 18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
| 19 #include "grit/theme_resources.h" | 19 #include "grit/theme_resources.h" |
| 20 #include "grit/theme_resources_standard.h" | 20 #include "grit/theme_resources_standard.h" |
| 21 #include "third_party/skia/include/effects/SkGradientShader.h" | 21 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 22 #include "ui/base/accessibility/accessible_view_state.h" | 22 #include "ui/base/accessibility/accessible_view_state.h" |
| 23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
| 24 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
| 25 #include "ui/gfx/canvas_skia_paint.h" | 25 #include "ui/gfx/canvas_skia_paint.h" |
| 26 #include "ui/gfx/image/image.h" | 26 #include "ui/gfx/image/image.h" |
| 27 #include "ui/views/focus/external_focus_tracker.h" | 27 #include "ui/views/focus/external_focus_tracker.h" |
| 28 #include "ui/views/widget/widget.h" | |
| 29 #include "ui/views/window/non_client_view.h" | 28 #include "ui/views/window/non_client_view.h" |
| 30 #include "views/controls/button/image_button.h" | 29 #include "views/controls/button/image_button.h" |
| 31 #include "views/controls/button/menu_button.h" | 30 #include "views/controls/button/menu_button.h" |
| 32 #include "views/controls/button/text_button.h" | 31 #include "views/controls/button/text_button.h" |
| 33 #include "views/controls/image_view.h" | 32 #include "views/controls/image_view.h" |
| 34 #include "views/controls/label.h" | 33 #include "views/controls/label.h" |
| 35 #include "views/controls/link.h" | 34 #include "views/controls/link.h" |
| 36 #include "views/controls/menu/menu_model_adapter.h" | 35 #include "views/controls/menu/menu_model_adapter.h" |
| 37 #include "views/controls/menu/menu_runner.h" | 36 #include "views/controls/menu/menu_runner.h" |
| 37 #include "views/widget/widget.h" |
| 38 | 38 |
| 39 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 40 #include "base/win/win_util.h" | 40 #include "base/win/win_util.h" |
| 41 #include "base/win/windows_version.h" | 41 #include "base/win/windows_version.h" |
| 42 #include "ui/base/win/hwnd_util.h" | 42 #include "ui/base/win/hwnd_util.h" |
| 43 #include "ui/gfx/icon_util.h" | 43 #include "ui/gfx/icon_util.h" |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 // static | 46 // static |
| 47 const int InfoBar::kSeparatorLineHeight = | 47 const int InfoBar::kSeparatorLineHeight = |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 // infobar. | 380 // infobar. |
| 381 if (focused_before && focused_now && !Contains(focused_before) && | 381 if (focused_before && focused_now && !Contains(focused_before) && |
| 382 Contains(focused_now) && GetWidget()) { | 382 Contains(focused_now) && GetWidget()) { |
| 383 GetWidget()->NotifyAccessibilityEvent( | 383 GetWidget()->NotifyAccessibilityEvent( |
| 384 this, ui::AccessibilityTypes::EVENT_ALERT, true); | 384 this, ui::AccessibilityTypes::EVENT_ALERT, true); |
| 385 } | 385 } |
| 386 } | 386 } |
| 387 | 387 |
| 388 void InfoBarView::OnDidChangeFocus(View* focused_before, View* focused_now) { | 388 void InfoBarView::OnDidChangeFocus(View* focused_before, View* focused_now) { |
| 389 } | 389 } |
| OLD | NEW |