OLD | NEW |
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/metro_viewer/chrome_metro_viewer_process_host_aurawin.h
" | 5 #include "chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.h
" |
6 | 6 |
7 #include "ash/display/display_info.h" | 7 #include "ash/display/display_info.h" |
8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/wm/window_positioner.h" | 10 #include "ash/wm/window_positioner.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void ChromeMetroViewerProcessHost::OnHandleSearchRequest( | 146 void ChromeMetroViewerProcessHost::OnHandleSearchRequest( |
147 const base::string16& search_string) { | 147 const base::string16& search_string) { |
148 GURL url(GetDefaultSearchURLForSearchTerms( | 148 GURL url(GetDefaultSearchURLForSearchTerms( |
149 ProfileManager::GetActiveUserProfile(), search_string)); | 149 ProfileManager::GetActiveUserProfile(), search_string)); |
150 if (url.is_valid()) | 150 if (url.is_valid()) |
151 OpenURL(url); | 151 OpenURL(url); |
152 } | 152 } |
153 | 153 |
154 void ChromeMetroViewerProcessHost::OnWindowSizeChanged(uint32 width, | 154 void ChromeMetroViewerProcessHost::OnWindowSizeChanged(uint32 width, |
155 uint32 height) { | 155 uint32 height) { |
156 std::vector<ash::internal::DisplayInfo> info_list; | 156 std::vector<ash::DisplayInfo> info_list; |
157 info_list.push_back(ash::internal::DisplayInfo::CreateFromSpec( | 157 info_list.push_back(ash::DisplayInfo::CreateFromSpec( |
158 base::StringPrintf("%dx%d*%f", width, height, gfx::GetModernUIScale()))); | 158 base::StringPrintf("%dx%d*%f", width, height, gfx::GetModernUIScale()))); |
159 ash::Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged( | 159 ash::Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged( |
160 info_list); | 160 info_list); |
161 aura::RemoteWindowTreeHostWin::Instance()->HandleWindowSizeChanged(width, | 161 aura::RemoteWindowTreeHostWin::Instance()->HandleWindowSizeChanged(width, |
162 height); | 162 height); |
163 } | 163 } |
OLD | NEW |