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

Side by Side Diff: webkit/glue/webview_impl.cc

Issue 223013: Another stab at the Chromium side of storage events. The WebKit side can be ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « webkit/glue/webkitclient_impl.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2007-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2007-2009 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 "config.h" 5 #include "config.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 MSVC_PUSH_WARNING_LEVEL(0); 9 MSVC_PUSH_WARNING_LEVEL(0);
10 #include "CSSStyleSelector.h" 10 #include "CSSStyleSelector.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // text zoom to half and 3x the original text size. These three values match 124 // text zoom to half and 3x the original text size. These three values match
125 // those in Apple's port in WebKit/WebKit/WebView/WebView.mm 125 // those in Apple's port in WebKit/WebKit/WebView/WebView.mm
126 static const double kTextSizeMultiplierRatio = 1.2; 126 static const double kTextSizeMultiplierRatio = 1.2;
127 static const double kMinTextSizeMultiplier = 0.5; 127 static const double kMinTextSizeMultiplier = 0.5;
128 static const double kMaxTextSizeMultiplier = 3.0; 128 static const double kMaxTextSizeMultiplier = 3.0;
129 129
130 // The group name identifies a namespace of pages. Page group is used on OSX 130 // The group name identifies a namespace of pages. Page group is used on OSX
131 // for some programs that use HTML views to display things that don't seem like 131 // for some programs that use HTML views to display things that don't seem like
132 // web pages to the user (so shouldn't have visited link coloring). We only use 132 // web pages to the user (so shouldn't have visited link coloring). We only use
133 // one page group. 133 // one page group.
134 static const char* kPageGroupName = "default"; 134 // FIXME: This needs to go into the WebKit API implementation and be hidden
135 // from the API's users.
136 const char* pageGroupName = "default";
135 137
136 // Ensure that the WebKit::WebDragOperation enum values stay in sync with 138 // Ensure that the WebKit::WebDragOperation enum values stay in sync with
137 // the original WebCore::DragOperation constants. 139 // the original WebCore::DragOperation constants.
138 #define COMPILE_ASSERT_MATCHING_ENUM(webcore_name) \ 140 #define COMPILE_ASSERT_MATCHING_ENUM(webcore_name) \
139 COMPILE_ASSERT(int(WebCore::webcore_name) == int(WebKit::Web##webcore_name),\ 141 COMPILE_ASSERT(int(WebCore::webcore_name) == int(WebKit::Web##webcore_name),\
140 dummy##webcore_name) 142 dummy##webcore_name)
141 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); 143 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone);
142 COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); 144 COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy);
143 COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); 145 COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink);
144 COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric); 146 COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric);
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 356
355 // Restrict the access to the local file system 357 // Restrict the access to the local file system
356 // (see WebView.mm WebView::_commonInitializationWithFrameName). 358 // (see WebView.mm WebView::_commonInitializationWithFrameName).
357 FrameLoader::setLocalLoadPolicy( 359 FrameLoader::setLocalLoadPolicy(
358 FrameLoader::AllowLocalLoadsForLocalOnly); 360 FrameLoader::AllowLocalLoadsForLocalOnly);
359 } 361 }
360 362
361 // static 363 // static
362 void WebView::UpdateVisitedLinkState(uint64 link_hash) { 364 void WebView::UpdateVisitedLinkState(uint64 link_hash) {
363 WebCore::Page::visitedStateChanged( 365 WebCore::Page::visitedStateChanged(
364 WebCore::PageGroup::pageGroup(kPageGroupName), link_hash); 366 WebCore::PageGroup::pageGroup(pageGroupName), link_hash);
365 } 367 }
366 368
367 // static 369 // static
368 void WebView::ResetVisitedLinkState() { 370 void WebView::ResetVisitedLinkState() {
369 WebCore::Page::allVisitedStateChanged( 371 WebCore::Page::allVisitedStateChanged(
370 WebCore::PageGroup::pageGroup(kPageGroupName)); 372 WebCore::PageGroup::pageGroup(pageGroupName));
371 } 373 }
372 374
373 375
374 WebViewImpl::WebViewImpl(WebViewDelegate* delegate) 376 WebViewImpl::WebViewImpl(WebViewDelegate* delegate)
375 : delegate_(delegate), 377 : delegate_(delegate),
376 ALLOW_THIS_IN_INITIALIZER_LIST(back_forward_list_client_impl_(this)), 378 ALLOW_THIS_IN_INITIALIZER_LIST(back_forward_list_client_impl_(this)),
377 ALLOW_THIS_IN_INITIALIZER_LIST(chrome_client_impl_(this)), 379 ALLOW_THIS_IN_INITIALIZER_LIST(chrome_client_impl_(this)),
378 ALLOW_THIS_IN_INITIALIZER_LIST(context_menu_client_impl_(this)), 380 ALLOW_THIS_IN_INITIALIZER_LIST(context_menu_client_impl_(this)),
379 ALLOW_THIS_IN_INITIALIZER_LIST(drag_client_impl_(this)), 381 ALLOW_THIS_IN_INITIALIZER_LIST(drag_client_impl_(this)),
380 ALLOW_THIS_IN_INITIALIZER_LIST(editor_client_impl_(this)), 382 ALLOW_THIS_IN_INITIALIZER_LIST(editor_client_impl_(this)),
(...skipping 26 matching lines...) Expand all
407 409
408 // the page will take ownership of the various clients 410 // the page will take ownership of the various clients
409 page_.reset(new Page(&chrome_client_impl_, 411 page_.reset(new Page(&chrome_client_impl_,
410 &context_menu_client_impl_, 412 &context_menu_client_impl_,
411 &editor_client_impl_, 413 &editor_client_impl_,
412 &drag_client_impl_, 414 &drag_client_impl_,
413 &inspector_client_impl_, 415 &inspector_client_impl_,
414 NULL)); 416 NULL));
415 417
416 page_->backForwardList()->setClient(&back_forward_list_client_impl_); 418 page_->backForwardList()->setClient(&back_forward_list_client_impl_);
417 page_->setGroupName(kPageGroupName); 419 page_->setGroupName(pageGroupName);
418 } 420 }
419 421
420 WebViewImpl::~WebViewImpl() { 422 WebViewImpl::~WebViewImpl() {
421 DCHECK(page_ == NULL); 423 DCHECK(page_ == NULL);
422 } 424 }
423 425
424 RenderTheme* WebViewImpl::theme() const { 426 RenderTheme* WebViewImpl::theme() const {
425 return page_.get() ? page_->theme() : RenderTheme::defaultTheme().get(); 427 return page_.get() ? page_->theme() : RenderTheme::defaultTheme().get();
426 } 428 }
427 429
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1897 return spelling_panel_is_visible_; 1899 return spelling_panel_is_visible_;
1898 } 1900 }
1899 1901
1900 void WebViewImpl::SetTabsToLinks(bool enable) { 1902 void WebViewImpl::SetTabsToLinks(bool enable) {
1901 tabs_to_links_ = enable; 1903 tabs_to_links_ = enable;
1902 } 1904 }
1903 1905
1904 bool WebViewImpl::GetTabsToLinks() const { 1906 bool WebViewImpl::GetTabsToLinks() const {
1905 return tabs_to_links_; 1907 return tabs_to_links_;
1906 } 1908 }
OLDNEW
« no previous file with comments | « webkit/glue/webkitclient_impl.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698