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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 669013002: Remove BackForwardClient, cleanup starting a history navigation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 WebViewImpl::WebViewImpl(WebViewClient* client) 368 WebViewImpl::WebViewImpl(WebViewClient* client)
369 : m_client(client) 369 : m_client(client)
370 , m_autofillClient(0) 370 , m_autofillClient(0)
371 , m_spellCheckClient(0) 371 , m_spellCheckClient(0)
372 , m_chromeClientImpl(this) 372 , m_chromeClientImpl(this)
373 , m_contextMenuClientImpl(this) 373 , m_contextMenuClientImpl(this)
374 , m_dragClientImpl(this) 374 , m_dragClientImpl(this)
375 , m_editorClientImpl(this) 375 , m_editorClientImpl(this)
376 , m_inspectorClientImpl(this) 376 , m_inspectorClientImpl(this)
377 , m_backForwardClientImpl(this)
378 , m_spellCheckerClientImpl(this) 377 , m_spellCheckerClientImpl(this)
379 , m_storageClientImpl(this) 378 , m_storageClientImpl(this)
380 , m_shouldAutoResize(false) 379 , m_shouldAutoResize(false)
381 , m_zoomLevel(0) 380 , m_zoomLevel(0)
382 , m_minimumZoomLevel(zoomFactorToZoomLevel(minTextSizeMultiplier)) 381 , m_minimumZoomLevel(zoomFactorToZoomLevel(minTextSizeMultiplier))
383 , m_maximumZoomLevel(zoomFactorToZoomLevel(maxTextSizeMultiplier)) 382 , m_maximumZoomLevel(zoomFactorToZoomLevel(maxTextSizeMultiplier))
384 , m_doubleTapZoomPageScaleFactor(0) 383 , m_doubleTapZoomPageScaleFactor(0)
385 , m_doubleTapZoomPending(false) 384 , m_doubleTapZoomPending(false)
386 , m_enableFakePageScaleAnimationForTesting(false) 385 , m_enableFakePageScaleAnimationForTesting(false)
387 , m_fakePageScaleAnimationPageScaleFactor(0) 386 , m_fakePageScaleAnimationPageScaleFactor(0)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 , m_userGestureObserved(false) 420 , m_userGestureObserved(false)
422 , m_topControlsContentOffset(0) 421 , m_topControlsContentOffset(0)
423 , m_topControlsLayoutHeight(0) 422 , m_topControlsLayoutHeight(0)
424 { 423 {
425 Page::PageClients pageClients; 424 Page::PageClients pageClients;
426 pageClients.chromeClient = &m_chromeClientImpl; 425 pageClients.chromeClient = &m_chromeClientImpl;
427 pageClients.contextMenuClient = &m_contextMenuClientImpl; 426 pageClients.contextMenuClient = &m_contextMenuClientImpl;
428 pageClients.editorClient = &m_editorClientImpl; 427 pageClients.editorClient = &m_editorClientImpl;
429 pageClients.dragClient = &m_dragClientImpl; 428 pageClients.dragClient = &m_dragClientImpl;
430 pageClients.inspectorClient = &m_inspectorClientImpl; 429 pageClients.inspectorClient = &m_inspectorClientImpl;
431 pageClients.backForwardClient = &m_backForwardClientImpl;
432 pageClients.spellCheckerClient = &m_spellCheckerClientImpl; 430 pageClients.spellCheckerClient = &m_spellCheckerClientImpl;
433 pageClients.storageClient = &m_storageClientImpl; 431 pageClients.storageClient = &m_storageClientImpl;
434 432
435 m_page = adoptPtrWillBeNoop(new Page(pageClients)); 433 m_page = adoptPtrWillBeNoop(new Page(pageClients));
436 MediaKeysController::provideMediaKeysTo(*m_page, &m_mediaKeysClientImpl); 434 MediaKeysController::provideMediaKeysTo(*m_page, &m_mediaKeysClientImpl);
437 provideSpeechRecognitionTo(*m_page, SpeechRecognitionClientProxy::create(cli ent ? client->speechRecognizer() : 0)); 435 provideSpeechRecognitionTo(*m_page, SpeechRecognitionClientProxy::create(cli ent ? client->speechRecognizer() : 0));
438 provideNavigatorContentUtilsTo(*m_page, NavigatorContentUtilsClientImpl::cre ate(this)); 436 provideNavigatorContentUtilsTo(*m_page, NavigatorContentUtilsClientImpl::cre ate(this));
439 437
440 provideContextFeaturesTo(*m_page, ContextFeaturesClientImpl::create()); 438 provideContextFeaturesTo(*m_page, ContextFeaturesClientImpl::create());
441 DeviceOrientationInspectorAgent::provideTo(*m_page); 439 DeviceOrientationInspectorAgent::provideTo(*m_page);
(...skipping 4023 matching lines...) Expand 10 before | Expand all | Expand 10 after
4465 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4463 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4466 4464
4467 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4465 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4468 return false; 4466 return false;
4469 4467
4470 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4468 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4471 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4469 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4472 } 4470 }
4473 4471
4474 } // namespace blink 4472 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698