| 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/location_bar/zoom_view.h" | 5 #include "chrome/browser/ui/views/location_bar/zoom_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/view_ids.h" | 7 #include "chrome/browser/ui/view_ids.h" |
| 8 #include "chrome/browser/ui/views/browser_dialogs.h" | 8 #include "chrome/browser/ui/views/browser_dialogs.h" |
| 9 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" | 9 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" |
| 10 #include "chrome/browser/ui/zoom/zoom_controller.h" | 10 #include "chrome/browser/ui/zoom/zoom_controller.h" |
| 11 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
| 12 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
| 13 #include "ui/base/accessibility/accessible_view_state.h" | 13 #include "ui/base/accessibility/accessible_view_state.h" |
| 14 #include "ui/base/event.h" | 14 #include "ui/base/events/event.h" |
| 15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
| 16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
| 17 #include "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
| 18 | 18 |
| 19 ZoomView::ZoomView(ToolbarModel* toolbar_model, | 19 ZoomView::ZoomView(ToolbarModel* toolbar_model, |
| 20 LocationBarView::Delegate* location_bar_delegate) | 20 LocationBarView::Delegate* location_bar_delegate) |
| 21 : toolbar_model_(toolbar_model), | 21 : toolbar_model_(toolbar_model), |
| 22 location_bar_delegate_(location_bar_delegate) { | 22 location_bar_delegate_(location_bar_delegate) { |
| 23 set_accessibility_focusable(true); | 23 set_accessibility_focusable(true); |
| 24 Update(NULL); | 24 Update(NULL); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 bool ZoomView::OnKeyPressed(const ui::KeyEvent& event) { | 67 bool ZoomView::OnKeyPressed(const ui::KeyEvent& event) { |
| 68 if (event.key_code() != ui::VKEY_SPACE && | 68 if (event.key_code() != ui::VKEY_SPACE && |
| 69 event.key_code() != ui::VKEY_RETURN) { | 69 event.key_code() != ui::VKEY_RETURN) { |
| 70 return false; | 70 return false; |
| 71 } | 71 } |
| 72 | 72 |
| 73 ZoomBubbleView::ShowBubble( | 73 ZoomBubbleView::ShowBubble( |
| 74 this, location_bar_delegate_->GetTabContents(), false); | 74 this, location_bar_delegate_->GetTabContents(), false); |
| 75 return true; | 75 return true; |
| 76 } | 76 } |
| OLD | NEW |