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/frame/browser_frame_win.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 // normal window and an incognito window are open simultaneously. | 400 // normal window and an incognito window are open simultaneously. |
401 Profile* profile_to_switch_to = NULL; | 401 Profile* profile_to_switch_to = NULL; |
402 Profile* current_profile = browser_view()->browser()->profile(); | 402 Profile* current_profile = browser_view()->browser()->profile(); |
403 if (current_profile->IsOffTheRecord()) | 403 if (current_profile->IsOffTheRecord()) |
404 profile_to_switch_to = current_profile->GetOriginalProfile(); | 404 profile_to_switch_to = current_profile->GetOriginalProfile(); |
405 else | 405 else |
406 profile_to_switch_to = current_profile->GetOffTheRecordProfile(); | 406 profile_to_switch_to = current_profile->GetOffTheRecordProfile(); |
407 | 407 |
408 DCHECK(profile_to_switch_to); | 408 DCHECK(profile_to_switch_to); |
409 | 409 |
410 Browser* browser_to_switch_to = browser::FindTabbedBrowser( | 410 Browser* browser_to_switch_to = chrome::FindTabbedBrowser( |
411 profile_to_switch_to, false, chrome::HOST_DESKTOP_TYPE_NATIVE); | 411 profile_to_switch_to, false, chrome::HOST_DESKTOP_TYPE_NATIVE); |
412 | 412 |
413 DCHECK(browser_to_switch_to); | 413 DCHECK(browser_to_switch_to); |
414 | 414 |
415 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser( | 415 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser( |
416 browser_to_switch_to); | 416 browser_to_switch_to); |
417 | 417 |
418 // Tell the metro_driver to switch to the Browser we found above. This | 418 // Tell the metro_driver to switch to the Browser we found above. This |
419 // causes the current browser window to be hidden. | 419 // causes the current browser window to be hidden. |
420 SetFrameWindow set_frame_window = reinterpret_cast<SetFrameWindow>( | 420 SetFrameWindow set_frame_window = reinterpret_cast<SetFrameWindow>( |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 | 615 |
616 //////////////////////////////////////////////////////////////////////////////// | 616 //////////////////////////////////////////////////////////////////////////////// |
617 // NativeBrowserFrame, public: | 617 // NativeBrowserFrame, public: |
618 | 618 |
619 // static | 619 // static |
620 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( | 620 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( |
621 BrowserFrame* browser_frame, | 621 BrowserFrame* browser_frame, |
622 BrowserView* browser_view) { | 622 BrowserView* browser_view) { |
623 return new BrowserFrameWin(browser_frame, browser_view); | 623 return new BrowserFrameWin(browser_frame, browser_view); |
624 } | 624 } |
OLD | NEW |