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/panels/old_panel.h" | 5 #include "chrome/browser/ui/panels/old_panel.h" |
6 | 6 |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/panels/panel_browser_window.h" | 8 #include "chrome/browser/ui/panels/panel_browser_window.h" |
9 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 return browser_->profile(); | 32 return browser_->profile(); |
33 } | 33 } |
34 | 34 |
35 void OldPanel::Initialize(const gfx::Rect& bounds, Browser* browser) { | 35 void OldPanel::Initialize(const gfx::Rect& bounds, Browser* browser) { |
36 Panel::Initialize(bounds, browser); | 36 Panel::Initialize(bounds, browser); |
37 panel_browser_window_.reset( | 37 panel_browser_window_.reset( |
38 new PanelBrowserWindow(browser, this, native_panel())); | 38 new PanelBrowserWindow(browser, this, native_panel())); |
39 } | 39 } |
40 | 40 |
41 content::WebContents* OldPanel::WebContents() const { | 41 content::WebContents* OldPanel::WebContents() const { |
42 return browser_->GetSelectedWebContents(); | 42 return browser_->GetActiveWebContents(); |
43 } | 43 } |
44 | 44 |
45 bool OldPanel::ShouldCloseWindow() { | 45 bool OldPanel::ShouldCloseWindow() { |
46 return browser_->ShouldCloseWindow(); | 46 return browser_->ShouldCloseWindow(); |
47 } | 47 } |
48 | 48 |
49 void OldPanel::OnWindowClosing() { | 49 void OldPanel::OnWindowClosing() { |
50 browser_->OnWindowClosing(); | 50 browser_->OnWindowClosing(); |
51 } | 51 } |
52 | 52 |
53 void OldPanel::ExecuteCommandWithDisposition( | 53 void OldPanel::ExecuteCommandWithDisposition( |
54 int id, WindowOpenDisposition disposition) { | 54 int id, WindowOpenDisposition disposition) { |
55 browser_->ExecuteCommandWithDisposition(id, disposition); | 55 browser_->ExecuteCommandWithDisposition(id, disposition); |
56 } | 56 } |
57 | 57 |
58 SkBitmap OldPanel::GetCurrentPageIcon() const { | 58 SkBitmap OldPanel::GetCurrentPageIcon() const { |
59 return browser_->GetCurrentPageIcon(); | 59 return browser_->GetCurrentPageIcon(); |
60 } | 60 } |
OLD | NEW |