OLD | NEW |
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/toolbar_view.h" | 5 #include "chrome/browser/ui/views/toolbar_view.h" |
6 | 6 |
7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.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 "chrome/browser/command_updater.h" | 10 #include "chrome/browser/command_updater.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "chrome/common/pref_names.h" | 39 #include "chrome/common/pref_names.h" |
40 #include "content/public/browser/browser_accessibility_state.h" | 40 #include "content/public/browser/browser_accessibility_state.h" |
41 #include "content/public/browser/notification_service.h" | 41 #include "content/public/browser/notification_service.h" |
42 #include "content/public/browser/render_view_host.h" | 42 #include "content/public/browser/render_view_host.h" |
43 #include "content/public/browser/user_metrics.h" | 43 #include "content/public/browser/user_metrics.h" |
44 #include "content/public/browser/web_contents.h" | 44 #include "content/public/browser/web_contents.h" |
45 #include "content/public/browser/web_contents_view.h" | 45 #include "content/public/browser/web_contents_view.h" |
46 #include "grit/chromium_strings.h" | 46 #include "grit/chromium_strings.h" |
47 #include "grit/generated_resources.h" | 47 #include "grit/generated_resources.h" |
48 #include "grit/theme_resources.h" | 48 #include "grit/theme_resources.h" |
49 #include "grit/theme_resources_standard.h" | |
50 #include "ui/base/accessibility/accessible_view_state.h" | 49 #include "ui/base/accessibility/accessible_view_state.h" |
51 #include "ui/base/l10n/l10n_util.h" | 50 #include "ui/base/l10n/l10n_util.h" |
52 #include "ui/base/layout.h" | 51 #include "ui/base/layout.h" |
53 #include "ui/base/resource/resource_bundle.h" | 52 #include "ui/base/resource/resource_bundle.h" |
54 #include "ui/base/theme_provider.h" | 53 #include "ui/base/theme_provider.h" |
55 #include "ui/gfx/canvas.h" | 54 #include "ui/gfx/canvas.h" |
56 #include "ui/gfx/skbitmap_operations.h" | 55 #include "ui/gfx/skbitmap_operations.h" |
57 #include "ui/views/controls/button/button_dropdown.h" | 56 #include "ui/views/controls/button/button_dropdown.h" |
58 #include "ui/views/controls/menu/menu_listener.h" | 57 #include "ui/views/controls/menu/menu_listener.h" |
59 #include "ui/views/focus/view_storage.h" | 58 #include "ui/views/focus/view_storage.h" |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 // LocationBarContainer is not a child of the ToolbarView. | 1001 // LocationBarContainer is not a child of the ToolbarView. |
1003 gfx::Point origin(bounds.origin()); | 1002 gfx::Point origin(bounds.origin()); |
1004 views::View::ConvertPointToView(this, location_bar_container_->parent(), | 1003 views::View::ConvertPointToView(this, location_bar_container_->parent(), |
1005 &origin); | 1004 &origin); |
1006 gfx::Rect target_bounds(origin, bounds.size()); | 1005 gfx::Rect target_bounds(origin, bounds.size()); |
1007 if (location_bar_container_->GetTargetBounds() != target_bounds) { | 1006 if (location_bar_container_->GetTargetBounds() != target_bounds) { |
1008 location_bar_container_->SetInToolbar(true); | 1007 location_bar_container_->SetInToolbar(true); |
1009 location_bar_container_->SetBoundsRect(target_bounds); | 1008 location_bar_container_->SetBoundsRect(target_bounds); |
1010 } | 1009 } |
1011 } | 1010 } |
OLD | NEW |