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/host/ash_remote_window_tree_host_win.h" | 9 #include "ash/host/ash_remote_window_tree_host_win.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 while (browser->tab_strip_model()->count()) | 53 while (browser->tab_strip_model()->count()) |
54 delete browser->tab_strip_model()->GetWebContentsAt(0); | 54 delete browser->tab_strip_model()->GetWebContentsAt(0); |
55 } | 55 } |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 void OpenURL(const GURL& url) { | 59 void OpenURL(const GURL& url) { |
60 chrome::NavigateParams params( | 60 chrome::NavigateParams params( |
61 ProfileManager::GetActiveUserProfile(), | 61 ProfileManager::GetActiveUserProfile(), |
62 GURL(url), | 62 GURL(url), |
63 content::PAGE_TRANSITION_TYPED); | 63 ui::PAGE_TRANSITION_TYPED); |
64 params.disposition = NEW_FOREGROUND_TAB; | 64 params.disposition = NEW_FOREGROUND_TAB; |
65 params.host_desktop_type = chrome::HOST_DESKTOP_TYPE_ASH; | 65 params.host_desktop_type = chrome::HOST_DESKTOP_TYPE_ASH; |
66 chrome::Navigate(¶ms); | 66 chrome::Navigate(¶ms); |
67 } | 67 } |
68 | 68 |
69 } // namespace | 69 } // namespace |
70 | 70 |
71 ChromeMetroViewerProcessHost::ChromeMetroViewerProcessHost() | 71 ChromeMetroViewerProcessHost::ChromeMetroViewerProcessHost() |
72 : MetroViewerProcessHost( | 72 : MetroViewerProcessHost( |
73 content::BrowserThread::GetMessageLoopProxyForThread( | 73 content::BrowserThread::GetMessageLoopProxyForThread( |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 void ChromeMetroViewerProcessHost::OnWindowSizeChanged(uint32 width, | 161 void ChromeMetroViewerProcessHost::OnWindowSizeChanged(uint32 width, |
162 uint32 height) { | 162 uint32 height) { |
163 std::vector<ash::DisplayInfo> info_list; | 163 std::vector<ash::DisplayInfo> info_list; |
164 info_list.push_back(ash::DisplayInfo::CreateFromSpec( | 164 info_list.push_back(ash::DisplayInfo::CreateFromSpec( |
165 base::StringPrintf("%dx%d*%f", width, height, gfx::GetDPIScale()))); | 165 base::StringPrintf("%dx%d*%f", width, height, gfx::GetDPIScale()))); |
166 ash::Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged( | 166 ash::Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged( |
167 info_list); | 167 info_list); |
168 aura::RemoteWindowTreeHostWin::Instance()->HandleWindowSizeChanged(width, | 168 aura::RemoteWindowTreeHostWin::Instance()->HandleWindowSizeChanged(width, |
169 height); | 169 height); |
170 } | 170 } |
OLD | NEW |