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

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

Issue 984023003: Avoid loosing of the display mode value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 , m_fullscreenController(FullscreenController::create(this)) 433 , m_fullscreenController(FullscreenController::create(this))
434 , m_showFPSCounter(false) 434 , m_showFPSCounter(false)
435 , m_showPaintRects(false) 435 , m_showPaintRects(false)
436 , m_showDebugBorders(false) 436 , m_showDebugBorders(false)
437 , m_continuousPaintingEnabled(false) 437 , m_continuousPaintingEnabled(false)
438 , m_showScrollBottleneckRects(false) 438 , m_showScrollBottleneckRects(false)
439 , m_baseBackgroundColor(Color::white) 439 , m_baseBackgroundColor(Color::white)
440 , m_backgroundColorOverride(Color::transparent) 440 , m_backgroundColorOverride(Color::transparent)
441 , m_zoomFactorOverride(0) 441 , m_zoomFactorOverride(0)
442 , m_userGestureObserved(false) 442 , m_userGestureObserved(false)
443 , m_displayMode(WebDisplayModeBrowser)
443 { 444 {
444 Page::PageClients pageClients; 445 Page::PageClients pageClients;
445 pageClients.chromeClient = &m_chromeClientImpl; 446 pageClients.chromeClient = &m_chromeClientImpl;
446 pageClients.contextMenuClient = &m_contextMenuClientImpl; 447 pageClients.contextMenuClient = &m_contextMenuClientImpl;
447 pageClients.editorClient = &m_editorClientImpl; 448 pageClients.editorClient = &m_editorClientImpl;
448 pageClients.dragClient = &m_dragClientImpl; 449 pageClients.dragClient = &m_dragClientImpl;
449 pageClients.inspectorClient = &m_inspectorClientImpl; 450 pageClients.inspectorClient = &m_inspectorClientImpl;
450 pageClients.spellCheckerClient = &m_spellCheckerClientImpl; 451 pageClients.spellCheckerClient = &m_spellCheckerClientImpl;
451 452
452 m_page = adoptPtrWillBeNoop(new Page(pageClients)); 453 m_page = adoptPtrWillBeNoop(new Page(pageClients));
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 mouseContextMenu(event); 570 mouseContextMenu(event);
570 #else 571 #else
571 if (event.button == WebMouseEvent::ButtonRight) 572 if (event.button == WebMouseEvent::ButtonRight)
572 mouseContextMenu(event); 573 mouseContextMenu(event);
573 #endif 574 #endif
574 } 575 }
575 } 576 }
576 577
577 void WebViewImpl::setDisplayMode(WebDisplayMode mode) 578 void WebViewImpl::setDisplayMode(WebDisplayMode mode)
578 { 579 {
580 m_displayMode = mode;
579 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 581 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
580 return; 582 return;
581 583
582 mainFrameImpl()->frameView()->setDisplayMode(mode); 584 mainFrameImpl()->frameView()->setDisplayMode(mode);
583 } 585 }
584 586
585 void WebViewImpl::mouseContextMenu(const WebMouseEvent& event) 587 void WebViewImpl::mouseContextMenu(const WebMouseEvent& event)
586 { 588 {
587 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 589 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
588 return; 590 return;
(...skipping 4100 matching lines...) Expand 10 before | Expand all | Expand 10 after
4689 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4691 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4690 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4692 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4691 } 4693 }
4692 4694
4693 void WebViewImpl::forceNextWebGLContextCreationToFail() 4695 void WebViewImpl::forceNextWebGLContextCreationToFail()
4694 { 4696 {
4695 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4697 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4696 } 4698 }
4697 4699
4698 } // namespace blink 4700 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698