| OLD | NEW |
| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 using WebKit::WebCompositionCommand; | 96 using WebKit::WebCompositionCommand; |
| 97 using WebKit::WebCompositionCommandConfirm; | 97 using WebKit::WebCompositionCommandConfirm; |
| 98 using WebKit::WebCompositionCommandDiscard; | 98 using WebKit::WebCompositionCommandDiscard; |
| 99 using WebKit::WebDragData; | 99 using WebKit::WebDragData; |
| 100 using WebKit::WebDragOperation; | 100 using WebKit::WebDragOperation; |
| 101 using WebKit::WebDragOperationCopy; | 101 using WebKit::WebDragOperationCopy; |
| 102 using WebKit::WebDragOperationNone; | 102 using WebKit::WebDragOperationNone; |
| 103 using WebKit::WebDragOperationsMask; | 103 using WebKit::WebDragOperationsMask; |
| 104 using WebKit::WebEditingClient; | 104 using WebKit::WebEditingClient; |
| 105 using WebKit::WebFrame; | 105 using WebKit::WebFrame; |
| 106 using WebKit::WebFrameClient; |
| 106 using WebKit::WebInputEvent; | 107 using WebKit::WebInputEvent; |
| 107 using WebKit::WebKeyboardEvent; | 108 using WebKit::WebKeyboardEvent; |
| 108 using WebKit::WebMouseEvent; | 109 using WebKit::WebMouseEvent; |
| 109 using WebKit::WebMouseWheelEvent; | 110 using WebKit::WebMouseWheelEvent; |
| 110 using WebKit::WebPoint; | 111 using WebKit::WebPoint; |
| 111 using WebKit::WebRect; | 112 using WebKit::WebRect; |
| 112 using WebKit::WebSettings; | 113 using WebKit::WebSettings; |
| 113 using WebKit::WebSettingsImpl; | 114 using WebKit::WebSettingsImpl; |
| 114 using WebKit::WebSize; | 115 using WebKit::WebSize; |
| 115 using WebKit::WebString; | 116 using WebKit::WebString; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 // WebView ---------------------------------------------------------------- | 334 // WebView ---------------------------------------------------------------- |
| 334 | 335 |
| 335 /*static*/ | 336 /*static*/ |
| 336 WebView* WebView::Create(WebViewDelegate* delegate, | 337 WebView* WebView::Create(WebViewDelegate* delegate, |
| 337 WebEditingClient* editing_client) { | 338 WebEditingClient* editing_client) { |
| 338 WebViewImpl* instance = new WebViewImpl(delegate, editing_client); | 339 WebViewImpl* instance = new WebViewImpl(delegate, editing_client); |
| 339 instance->AddRef(); | 340 instance->AddRef(); |
| 340 return instance; | 341 return instance; |
| 341 } | 342 } |
| 342 | 343 |
| 343 void WebViewImpl::InitializeMainFrame() { | 344 void WebViewImpl::InitializeMainFrame(WebFrameClient* frame_client) { |
| 344 // NOTE: The WebFrameImpl takes a reference to itself within InitMainFrame | 345 // NOTE: The WebFrameImpl takes a reference to itself within InitMainFrame |
| 345 // and releases that reference once the corresponding Frame is destroyed. | 346 // and releases that reference once the corresponding Frame is destroyed. |
| 346 scoped_refptr<WebFrameImpl> main_frame = new WebFrameImpl(); | 347 scoped_refptr<WebFrameImpl> main_frame = new WebFrameImpl(frame_client); |
| 347 | 348 |
| 348 main_frame->InitMainFrame(this); | 349 main_frame->InitMainFrame(this); |
| 349 | 350 |
| 350 WebDevToolsAgentDelegate* tools_delegate = | 351 WebDevToolsAgentDelegate* tools_delegate = |
| 351 delegate_->GetWebDevToolsAgentDelegate(); | 352 delegate_->GetWebDevToolsAgentDelegate(); |
| 352 if (tools_delegate) | 353 if (tools_delegate) |
| 353 devtools_agent_.reset(new WebDevToolsAgentImpl(this, tools_delegate)); | 354 devtools_agent_.reset(new WebDevToolsAgentImpl(this, tools_delegate)); |
| 354 | 355 |
| 355 // Restrict the access to the local file system | 356 // Restrict the access to the local file system |
| 356 // (see WebView.mm WebView::_commonInitializationWithFrameName). | 357 // (see WebView.mm WebView::_commonInitializationWithFrameName). |
| (...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1927 | 1928 |
| 1928 return document->focusedNode(); | 1929 return document->focusedNode(); |
| 1929 } | 1930 } |
| 1930 | 1931 |
| 1931 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { | 1932 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { |
| 1932 IntPoint doc_point( | 1933 IntPoint doc_point( |
| 1933 page_->mainFrame()->view()->windowToContents(pos)); | 1934 page_->mainFrame()->view()->windowToContents(pos)); |
| 1934 return page_->mainFrame()->eventHandler()-> | 1935 return page_->mainFrame()->eventHandler()-> |
| 1935 hitTestResultAtPoint(doc_point, false); | 1936 hitTestResultAtPoint(doc_point, false); |
| 1936 } | 1937 } |
| OLD | NEW |