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

Side by Side Diff: chrome/browser/external_tab_container_win.cc

Issue 6881107: Rework the way Widget::Init works: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/external_tab_container_win.h" 5 #include "chrome/browser/external_tab_container_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 NOTREACHED(); 127 NOTREACHED();
128 return false; 128 return false;
129 } 129 }
130 130
131 load_requests_via_automation_ = load_requests_via_automation; 131 load_requests_via_automation_ = load_requests_via_automation;
132 handle_top_level_requests_ = handle_top_level_requests; 132 handle_top_level_requests_ = handle_top_level_requests;
133 infobars_enabled_ = infobars_enabled; 133 infobars_enabled_ = infobars_enabled;
134 route_all_top_level_navigations_ = route_all_top_level_navigations; 134 route_all_top_level_navigations_ = route_all_top_level_navigations;
135 135
136 set_window_style(WS_POPUP | WS_CLIPCHILDREN); 136 set_window_style(WS_POPUP | WS_CLIPCHILDREN);
137 views::WidgetWin::Init(NULL, bounds); 137
138 views::Widget::CreateParams params(views::Widget::CreateParams::TYPE_POPUP);
139 params.bounds = bounds;
140 GetWidget()->Init(params);
138 if (!IsWindow()) { 141 if (!IsWindow()) {
139 NOTREACHED(); 142 NOTREACHED();
140 return false; 143 return false;
141 } 144 }
142 145
143 // TODO(jcampan): limit focus traversal to contents. 146 // TODO(jcampan): limit focus traversal to contents.
144 147
145 prop_.reset(new ViewProp(GetNativeView(), kWindowObjectKey, this)); 148 prop_.reset(new ViewProp(GetNativeView(), kWindowObjectKey, this));
146 149
147 if (existing_contents) { 150 if (existing_contents) {
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 1112
1110 if (disposition == CURRENT_TAB) { 1113 if (disposition == CURRENT_TAB) {
1111 DCHECK(route_all_top_level_navigations_); 1114 DCHECK(route_all_top_level_navigations_);
1112 disposition = NEW_FOREGROUND_TAB; 1115 disposition = NEW_FOREGROUND_TAB;
1113 } 1116 }
1114 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, 1117 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition,
1115 transition); 1118 transition);
1116 // support only one navigation for a dummy tab before it is killed. 1119 // support only one navigation for a dummy tab before it is killed.
1117 ::DestroyWindow(GetNativeView()); 1120 ::DestroyWindow(GetNativeView());
1118 } 1121 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/panels/panel_scroller.cc ('k') | chrome/browser/first_run/try_chrome_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698