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

Side by Side Diff: chrome/browser/ui/views/frame/browser_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 #include "components/signin/core/common/profile_management_switches.h" 117 #include "components/signin/core/common/profile_management_switches.h"
118 #include "components/translate/core/browser/language_state.h" 118 #include "components/translate/core/browser/language_state.h"
119 #include "content/public/browser/download_manager.h" 119 #include "content/public/browser/download_manager.h"
120 #include "content/public/browser/notification_service.h" 120 #include "content/public/browser/notification_service.h"
121 #include "content/public/browser/render_frame_host.h" 121 #include "content/public/browser/render_frame_host.h"
122 #include "content/public/browser/render_view_host.h" 122 #include "content/public/browser/render_view_host.h"
123 #include "content/public/browser/render_widget_host_view.h" 123 #include "content/public/browser/render_widget_host_view.h"
124 #include "content/public/browser/user_metrics.h" 124 #include "content/public/browser/user_metrics.h"
125 #include "content/public/browser/web_contents.h" 125 #include "content/public/browser/web_contents.h"
126 #include "content/public/common/content_switches.h" 126 #include "content/public/common/content_switches.h"
127 #include "ui/accessibility/ax_view_state.h" 127 #include "ui/accessibility/ax_node_data.h"
128 #include "ui/base/accelerators/accelerator.h" 128 #include "ui/base/accelerators/accelerator.h"
129 #include "ui/base/hit_test.h" 129 #include "ui/base/hit_test.h"
130 #include "ui/base/l10n/l10n_util.h" 130 #include "ui/base/l10n/l10n_util.h"
131 #include "ui/base/material_design/material_design_controller.h" 131 #include "ui/base/material_design/material_design_controller.h"
132 #include "ui/base/resource/resource_bundle.h" 132 #include "ui/base/resource/resource_bundle.h"
133 #include "ui/base/theme_provider.h" 133 #include "ui/base/theme_provider.h"
134 #include "ui/content_accelerators/accelerator_util.h" 134 #include "ui/content_accelerators/accelerator_util.h"
135 #include "ui/display/screen.h" 135 #include "ui/display/screen.h"
136 #include "ui/events/event_utils.h" 136 #include "ui/events/event_utils.h"
137 #include "ui/gfx/canvas.h" 137 #include "ui/gfx/canvas.h"
(...skipping 1751 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 if (!initialized_ && details.is_add && details.child == this && GetWidget()) { 1889 if (!initialized_ && details.is_add && details.child == this && GetWidget()) {
1890 InitViews(); 1890 InitViews();
1891 initialized_ = true; 1891 initialized_ = true;
1892 } 1892 }
1893 } 1893 }
1894 1894
1895 void BrowserView::ChildPreferredSizeChanged(View* child) { 1895 void BrowserView::ChildPreferredSizeChanged(View* child) {
1896 Layout(); 1896 Layout();
1897 } 1897 }
1898 1898
1899 void BrowserView::GetAccessibleState(ui::AXViewState* state) { 1899 void BrowserView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
1900 state->role = ui::AX_ROLE_CLIENT; 1900 node_data->role = ui::AX_ROLE_CLIENT;
1901 } 1901 }
1902 1902
1903 void BrowserView::OnThemeChanged() { 1903 void BrowserView::OnThemeChanged() {
1904 if (!IsRegularOrGuestSession()) { 1904 if (!IsRegularOrGuestSession()) {
1905 // When the theme changes, the native theme may also change (in incognito, 1905 // When the theme changes, the native theme may also change (in incognito,
1906 // the usage of dark or normal hinges on the browser theme), so we have to 1906 // the usage of dark or normal hinges on the browser theme), so we have to
1907 // propagate both kinds of change. 1907 // propagate both kinds of change.
1908 base::AutoReset<bool> reset(&handling_theme_changed_, true); 1908 base::AutoReset<bool> reset(&handling_theme_changed_, true);
1909 #if defined(OS_WIN) 1909 #if defined(OS_WIN)
1910 ui::NativeThemeDarkWin::instance()->NotifyObservers(); 1910 ui::NativeThemeDarkWin::instance()->NotifyObservers();
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 } 2589 }
2590 2590
2591 extensions::ActiveTabPermissionGranter* 2591 extensions::ActiveTabPermissionGranter*
2592 BrowserView::GetActiveTabPermissionGranter() { 2592 BrowserView::GetActiveTabPermissionGranter() {
2593 content::WebContents* web_contents = GetActiveWebContents(); 2593 content::WebContents* web_contents = GetActiveWebContents();
2594 if (!web_contents) 2594 if (!web_contents)
2595 return nullptr; 2595 return nullptr;
2596 return extensions::TabHelper::FromWebContents(web_contents) 2596 return extensions::TabHelper::FromWebContents(web_contents)
2597 ->active_tab_permission_granter(); 2597 ->active_tab_permission_granter();
2598 } 2598 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698