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

Side by Side Diff: chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc

Issue 10031044: TabContents -> WebContentsImpl, part 5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (fixed) Created 8 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) 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/tab_contents/tab_contents_view_views.h" 5 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/ui/constrained_window.h" 10 #include "chrome/browser/ui/constrained_window.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 views::Widget* TabContentsViewViews::GetSadTab() const { 264 views::Widget* TabContentsViewViews::GetSadTab() const {
265 TabContentsWrapper* wrapper = 265 TabContentsWrapper* wrapper =
266 TabContentsWrapper::GetCurrentWrapperForContents(web_contents_); 266 TabContentsWrapper::GetCurrentWrapperForContents(web_contents_);
267 return wrapper ? wrapper->sad_tab_helper()->sad_tab() : NULL; 267 return wrapper ? wrapper->sad_tab_helper()->sad_tab() : NULL;
268 } 268 }
269 269
270 void TabContentsViewViews::CreateNewWindow( 270 void TabContentsViewViews::CreateNewWindow(
271 int route_id, 271 int route_id,
272 const ViewHostMsg_CreateWindow_Params& params) { 272 const ViewHostMsg_CreateWindow_Params& params) {
273 tab_contents_view_helper_.CreateNewWindow(web_contents_, route_id, params); 273 web_contents_view_helper_.CreateNewWindow(web_contents_, route_id, params);
274 } 274 }
275 275
276 void TabContentsViewViews::CreateNewWidget( 276 void TabContentsViewViews::CreateNewWidget(
277 int route_id, WebKit::WebPopupType popup_type) { 277 int route_id, WebKit::WebPopupType popup_type) {
278 tab_contents_view_helper_.CreateNewWidget(web_contents_, 278 web_contents_view_helper_.CreateNewWidget(web_contents_,
279 route_id, 279 route_id,
280 false, 280 false,
281 popup_type); 281 popup_type);
282 } 282 }
283 283
284 void TabContentsViewViews::CreateNewFullscreenWidget(int route_id) { 284 void TabContentsViewViews::CreateNewFullscreenWidget(int route_id) {
285 tab_contents_view_helper_.CreateNewWidget(web_contents_, 285 web_contents_view_helper_.CreateNewWidget(web_contents_,
286 route_id, 286 route_id,
287 true, 287 true,
288 WebKit::WebPopupTypeNone); 288 WebKit::WebPopupTypeNone);
289 } 289 }
290 290
291 void TabContentsViewViews::ShowCreatedWindow(int route_id, 291 void TabContentsViewViews::ShowCreatedWindow(int route_id,
292 WindowOpenDisposition disposition, 292 WindowOpenDisposition disposition,
293 const gfx::Rect& initial_pos, 293 const gfx::Rect& initial_pos,
294 bool user_gesture) { 294 bool user_gesture) {
295 tab_contents_view_helper_.ShowCreatedWindow( 295 web_contents_view_helper_.ShowCreatedWindow(
296 web_contents_, route_id, disposition, initial_pos, user_gesture); 296 web_contents_, route_id, disposition, initial_pos, user_gesture);
297 } 297 }
298 298
299 void TabContentsViewViews::ShowCreatedWidget( 299 void TabContentsViewViews::ShowCreatedWidget(
300 int route_id, const gfx::Rect& initial_pos) { 300 int route_id, const gfx::Rect& initial_pos) {
301 tab_contents_view_helper_.ShowCreatedWidget(web_contents_, 301 web_contents_view_helper_.ShowCreatedWidget(web_contents_,
302 route_id, 302 route_id,
303 false, 303 false,
304 initial_pos); 304 initial_pos);
305 } 305 }
306 306
307 void TabContentsViewViews::ShowCreatedFullscreenWidget(int route_id) { 307 void TabContentsViewViews::ShowCreatedFullscreenWidget(int route_id) {
308 tab_contents_view_helper_.ShowCreatedWidget(web_contents_, 308 web_contents_view_helper_.ShowCreatedWidget(web_contents_,
309 route_id, 309 route_id,
310 true, 310 true,
311 gfx::Rect()); 311 gfx::Rect());
312 } 312 }
313 313
314 void TabContentsViewViews::ShowContextMenu( 314 void TabContentsViewViews::ShowContextMenu(
315 const content::ContextMenuParams& params) { 315 const content::ContextMenuParams& params) {
316 // Allow delegates to handle the context menu operation first. 316 // Allow delegates to handle the context menu operation first.
317 if (web_contents_->GetDelegate() && 317 if (web_contents_->GetDelegate() &&
318 web_contents_->GetDelegate()->HandleContextMenu(params)) { 318 web_contents_->GetDelegate()->HandleContextMenu(params)) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 419 }
420 } 420 }
421 421
422 void TabContentsViewViews::OnNativeWidgetSizeChanged( 422 void TabContentsViewViews::OnNativeWidgetSizeChanged(
423 const gfx::Size& new_size) { 423 const gfx::Size& new_size) {
424 views::Widget* sad_tab = GetSadTab(); 424 views::Widget* sad_tab = GetSadTab();
425 if (sad_tab) 425 if (sad_tab)
426 sad_tab->SetBounds(gfx::Rect(new_size)); 426 sad_tab->SetBounds(gfx::Rect(new_size));
427 views::Widget::OnNativeWidgetSizeChanged(new_size); 427 views::Widget::OnNativeWidgetSizeChanged(new_size);
428 } 428 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698