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

Side by Side Diff: chrome/browser/ui/panels/old_panel.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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 | Annotate | Revision Log
OLDNEW
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/browser_command_controller.h" 8 #include "chrome/browser/ui/browser_command_controller.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/browser_tabstrip.h"
10 #include "chrome/browser/ui/panels/panel_browser_window.h" 11 #include "chrome/browser/ui/panels/panel_browser_window.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 12 #include "third_party/skia/include/core/SkBitmap.h"
12 13
13 OldPanel::OldPanel(Browser* browser, 14 OldPanel::OldPanel(Browser* browser,
14 const gfx::Size& min_size, const gfx::Size& max_size) 15 const gfx::Size& min_size, const gfx::Size& max_size)
15 : Panel(browser->app_name(), min_size, max_size), 16 : Panel(browser->app_name(), min_size, max_size),
16 browser_(browser) { 17 browser_(browser) {
17 } 18 }
18 19
19 OldPanel::~OldPanel() {} 20 OldPanel::~OldPanel() {}
(...skipping 14 matching lines...) Expand all
34 return browser_->profile(); 35 return browser_->profile();
35 } 36 }
36 37
37 void OldPanel::Initialize(const gfx::Rect& bounds, Browser* browser) { 38 void OldPanel::Initialize(const gfx::Rect& bounds, Browser* browser) {
38 Panel::Initialize(bounds, browser); 39 Panel::Initialize(bounds, browser);
39 panel_browser_window_.reset( 40 panel_browser_window_.reset(
40 new PanelBrowserWindow(browser, this, native_panel())); 41 new PanelBrowserWindow(browser, this, native_panel()));
41 } 42 }
42 43
43 content::WebContents* OldPanel::WebContents() const { 44 content::WebContents* OldPanel::WebContents() const {
44 return browser_->GetActiveWebContents(); 45 return chrome::GetActiveWebContents(browser_);
45 } 46 }
46 47
47 bool OldPanel::ShouldCloseWindow() { 48 bool OldPanel::ShouldCloseWindow() {
48 return browser_->ShouldCloseWindow(); 49 return browser_->ShouldCloseWindow();
49 } 50 }
50 51
51 void OldPanel::OnWindowClosing() { 52 void OldPanel::OnWindowClosing() {
52 browser_->OnWindowClosing(); 53 browser_->OnWindowClosing();
53 } 54 }
54 55
55 void OldPanel::ExecuteCommandWithDisposition( 56 void OldPanel::ExecuteCommandWithDisposition(
56 int id, WindowOpenDisposition disposition) { 57 int id, WindowOpenDisposition disposition) {
57 chrome::ExecuteCommandWithDisposition(browser_, id, disposition); 58 chrome::ExecuteCommandWithDisposition(browser_, id, disposition);
58 } 59 }
59 60
60 SkBitmap OldPanel::GetCurrentPageIcon() const { 61 SkBitmap OldPanel::GetCurrentPageIcon() const {
61 return browser_->GetCurrentPageIcon(); 62 return browser_->GetCurrentPageIcon();
62 } 63 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/old_base_panel_browser_test.cc ('k') | chrome/browser/ui/panels/old_panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698