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

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

Issue 19804008: Add a Blink API to set window features on a WebView. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebView.h » ('j') | 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #include "WebNode.h" 80 #include "WebNode.h"
81 #include "WebPagePopupImpl.h" 81 #include "WebPagePopupImpl.h"
82 #include "WebPlugin.h" 82 #include "WebPlugin.h"
83 #include "WebPluginAction.h" 83 #include "WebPluginAction.h"
84 #include "WebPluginContainerImpl.h" 84 #include "WebPluginContainerImpl.h"
85 #include "WebPopupMenuImpl.h" 85 #include "WebPopupMenuImpl.h"
86 #include "WebRange.h" 86 #include "WebRange.h"
87 #include "WebSettingsImpl.h" 87 #include "WebSettingsImpl.h"
88 #include "WebTextInputInfo.h" 88 #include "WebTextInputInfo.h"
89 #include "WebViewClient.h" 89 #include "WebViewClient.h"
90 #include "WebWindowFeatures.h"
90 #include "core/accessibility/AXObjectCache.h" 91 #include "core/accessibility/AXObjectCache.h"
91 #include "core/css/resolver/StyleResolver.h" 92 #include "core/css/resolver/StyleResolver.h"
92 #include "core/dom/Document.h" 93 #include "core/dom/Document.h"
93 #include "core/dom/DocumentMarkerController.h" 94 #include "core/dom/DocumentMarkerController.h"
94 #include "core/dom/FullscreenController.h" 95 #include "core/dom/FullscreenController.h"
95 #include "core/dom/KeyboardEvent.h" 96 #include "core/dom/KeyboardEvent.h"
96 #include "core/dom/NodeRenderStyle.h" 97 #include "core/dom/NodeRenderStyle.h"
97 #include "core/dom/Text.h" 98 #include "core/dom/Text.h"
98 #include "core/dom/WheelEvent.h" 99 #include "core/dom/WheelEvent.h"
99 #include "core/editing/Editor.h" 100 #include "core/editing/Editor.h"
(...skipping 3487 matching lines...) Expand 10 before | Expand all | Expand 10 after
3587 bool WebViewImpl::isActive() const 3588 bool WebViewImpl::isActive() const
3588 { 3589 {
3589 return (page() && page()->focusController()) ? page()->focusController()->is Active() : false; 3590 return (page() && page()->focusController()) ? page()->focusController()->is Active() : false;
3590 } 3591 }
3591 3592
3592 void WebViewImpl::setDomainRelaxationForbidden(bool forbidden, const WebString& scheme) 3593 void WebViewImpl::setDomainRelaxationForbidden(bool forbidden, const WebString& scheme)
3593 { 3594 {
3594 SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, String(s cheme)); 3595 SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, String(s cheme));
3595 } 3596 }
3596 3597
3598 void WebViewImpl::setWindowFeatures(const WebWindowFeatures& features)
3599 {
3600 m_page->chrome().setWindowFeatures(features);
3601 }
3602
3597 void WebViewImpl::setScrollbarColors(unsigned inactiveColor, 3603 void WebViewImpl::setScrollbarColors(unsigned inactiveColor,
3598 unsigned activeColor, 3604 unsigned activeColor,
3599 unsigned trackColor) { 3605 unsigned trackColor) {
3600 #if ENABLE(DEFAULT_RENDER_THEME) 3606 #if ENABLE(DEFAULT_RENDER_THEME)
3601 PlatformThemeChromiumDefault::setScrollbarColors(inactiveColor, activeColor, trackColor); 3607 PlatformThemeChromiumDefault::setScrollbarColors(inactiveColor, activeColor, trackColor);
3602 #endif 3608 #endif
3603 } 3609 }
3604 3610
3605 void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor, 3611 void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor,
3606 unsigned activeForegroundColor, 3612 unsigned activeForegroundColor,
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
4144 } 4150 }
4145 4151
4146 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4152 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4147 { 4153 {
4148 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4154 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4149 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4155 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4150 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4156 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4151 } 4157 }
4152 4158
4153 } // namespace WebKit 4159 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698