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

Side by Side Diff: chrome/browser/ui/browser_tab_strip_model_delegate.cc

Issue 1662783002: Remove HostDesktopType from Browser::CreateParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-12
Patch Set: remove desktop_type_ in bookmark_bubble_sign_in_delegate Created 4 years, 10 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
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest.cc ('k') | chrome/browser/ui/chrome_pages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_tab_strip_model_delegate.h" 5 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 chrome::AddTabAt(browser_, url, index, foreground); 50 chrome::AddTabAt(browser_, url, index, foreground);
51 } 51 }
52 52
53 Browser* BrowserTabStripModelDelegate::CreateNewStripWithContents( 53 Browser* BrowserTabStripModelDelegate::CreateNewStripWithContents(
54 const std::vector<NewStripContents>& contentses, 54 const std::vector<NewStripContents>& contentses,
55 const gfx::Rect& window_bounds, 55 const gfx::Rect& window_bounds,
56 bool maximize) { 56 bool maximize) {
57 DCHECK(browser_->CanSupportWindowFeature(Browser::FEATURE_TABSTRIP)); 57 DCHECK(browser_->CanSupportWindowFeature(Browser::FEATURE_TABSTRIP));
58 58
59 // Create an empty new browser window the same size as the old one. 59 // Create an empty new browser window the same size as the old one.
60 Browser::CreateParams params(browser_->profile(), 60 Browser::CreateParams params(browser_->profile());
61 browser_->host_desktop_type());
62 params.initial_bounds = window_bounds; 61 params.initial_bounds = window_bounds;
63 params.initial_show_state = 62 params.initial_show_state =
64 maximize ? ui::SHOW_STATE_MAXIMIZED : ui::SHOW_STATE_NORMAL; 63 maximize ? ui::SHOW_STATE_MAXIMIZED : ui::SHOW_STATE_NORMAL;
65 Browser* browser = new Browser(params); 64 Browser* browser = new Browser(params);
66 TabStripModel* new_model = browser->tab_strip_model(); 65 TabStripModel* new_model = browser->tab_strip_model();
67 66
68 for (size_t i = 0; i < contentses.size(); ++i) { 67 for (size_t i = 0; i < contentses.size(); ++i) {
69 NewStripContents item = contentses[i]; 68 NewStripContents item = contentses[i];
70 69
71 // Enforce that there is an active tab in the strip at all times by forcing 70 // Enforce that there is an active tab in the strip at all times by forcing
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 160 }
162 161
163 //////////////////////////////////////////////////////////////////////////////// 162 ////////////////////////////////////////////////////////////////////////////////
164 // BrowserTabStripModelDelegate, private: 163 // BrowserTabStripModelDelegate, private:
165 164
166 void BrowserTabStripModelDelegate::CloseFrame() { 165 void BrowserTabStripModelDelegate::CloseFrame() {
167 browser_->window()->Close(); 166 browser_->window()->Close();
168 } 167 }
169 168
170 } // namespace chrome 169 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest.cc ('k') | chrome/browser/ui/chrome_pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698