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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 years, 1 month 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
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/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "components/search_engines/template_url_service.h" 66 #include "components/search_engines/template_url_service.h"
67 #include "components/toolbar/toolbar_model.h" 67 #include "components/toolbar/toolbar_model.h"
68 #include "components/translate/core/browser/language_state.h" 68 #include "components/translate/core/browser/language_state.h"
69 #include "components/variations/variations_associated_data.h" 69 #include "components/variations/variations_associated_data.h"
70 #include "components/zoom/zoom_controller.h" 70 #include "components/zoom/zoom_controller.h"
71 #include "components/zoom/zoom_event_manager.h" 71 #include "components/zoom/zoom_event_manager.h"
72 #include "content/public/browser/render_widget_host_view.h" 72 #include "content/public/browser/render_widget_host_view.h"
73 #include "content/public/browser/web_contents.h" 73 #include "content/public/browser/web_contents.h"
74 #include "extensions/browser/extension_registry.h" 74 #include "extensions/browser/extension_registry.h"
75 #include "extensions/common/feature_switch.h" 75 #include "extensions/common/feature_switch.h"
76 #include "ui/accessibility/ax_view_state.h" 76 #include "ui/accessibility/ax_node_data.h"
77 #include "ui/base/dragdrop/drag_drop_types.h" 77 #include "ui/base/dragdrop/drag_drop_types.h"
78 #include "ui/base/resource/resource_bundle.h" 78 #include "ui/base/resource/resource_bundle.h"
79 #include "ui/base/theme_provider.h" 79 #include "ui/base/theme_provider.h"
80 #include "ui/compositor/paint_recorder.h" 80 #include "ui/compositor/paint_recorder.h"
81 #include "ui/events/event.h" 81 #include "ui/events/event.h"
82 #include "ui/gfx/animation/slide_animation.h" 82 #include "ui/gfx/animation/slide_animation.h"
83 #include "ui/gfx/canvas.h" 83 #include "ui/gfx/canvas.h"
84 #include "ui/gfx/color_palette.h" 84 #include "ui/gfx/color_palette.h"
85 #include "ui/gfx/color_utils.h" 85 #include "ui/gfx/color_utils.h"
86 #include "ui/gfx/image/image.h" 86 #include "ui/gfx/image/image.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 return omnibox_view_; 496 return omnibox_view_;
497 } 497 }
498 498
499 //////////////////////////////////////////////////////////////////////////////// 499 ////////////////////////////////////////////////////////////////////////////////
500 // LocationBarView, public views::View implementation: 500 // LocationBarView, public views::View implementation:
501 501
502 bool LocationBarView::HasFocus() const { 502 bool LocationBarView::HasFocus() const {
503 return omnibox_view_->model()->has_focus(); 503 return omnibox_view_->model()->has_focus();
504 } 504 }
505 505
506 void LocationBarView::GetAccessibleState(ui::AXViewState* state) { 506 void LocationBarView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
507 state->role = ui::AX_ROLE_GROUP; 507 node_data->role = ui::AX_ROLE_GROUP;
508 } 508 }
509 509
510 gfx::Size LocationBarView::GetPreferredSize() const { 510 gfx::Size LocationBarView::GetPreferredSize() const {
511 // Compute minimum height. 511 // Compute minimum height.
512 gfx::Size min_size(0, GetLayoutConstant(LOCATION_BAR_HEIGHT)); 512 gfx::Size min_size(0, GetLayoutConstant(LOCATION_BAR_HEIGHT));
513 513
514 if (!IsInitialized()) 514 if (!IsInitialized())
515 return min_size; 515 return min_size;
516 516
517 min_size.set_height(min_size.height() * size_animation_.GetCurrentValue()); 517 min_size.set_height(min_size.height() * size_animation_.GetCurrentValue());
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 // LocationBarView, private TemplateURLServiceObserver implementation: 1351 // LocationBarView, private TemplateURLServiceObserver implementation:
1352 1352
1353 void LocationBarView::OnTemplateURLServiceChanged() { 1353 void LocationBarView::OnTemplateURLServiceChanged() {
1354 template_url_service_->RemoveObserver(this); 1354 template_url_service_->RemoveObserver(this);
1355 template_url_service_ = nullptr; 1355 template_url_service_ = nullptr;
1356 // If the browser is no longer active, let's not show the info bubble, as this 1356 // If the browser is no longer active, let's not show the info bubble, as this
1357 // would make the browser the active window again. 1357 // would make the browser the active window again.
1358 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1358 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1359 ShowFirstRunBubble(); 1359 ShowFirstRunBubble();
1360 } 1360 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698