| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/public/browser/web_contents_delegate.h" | 5 #include "content/public/browser/web_contents_delegate.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 WebContents* WebContentsDelegate::OpenURLFromTab(WebContents* source, | 23 WebContents* WebContentsDelegate::OpenURLFromTab(WebContents* source, |
| 24 const OpenURLParams& params) { | 24 const OpenURLParams& params) { |
| 25 return NULL; | 25 return NULL; |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const { | 28 bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const { |
| 29 return false; | 29 return false; |
| 30 } | 30 } |
| 31 | 31 |
| 32 bool WebContentsDelegate::IsApplication() const { return false; } | |
| 33 | |
| 34 bool WebContentsDelegate::CanLoadDataURLsInWebUI() const { return false; } | 32 bool WebContentsDelegate::CanLoadDataURLsInWebUI() const { return false; } |
| 35 | 33 |
| 36 gfx::Rect WebContentsDelegate::GetRootWindowResizerRect() const { | 34 gfx::Rect WebContentsDelegate::GetRootWindowResizerRect() const { |
| 37 return gfx::Rect(); | 35 return gfx::Rect(); |
| 38 } | 36 } |
| 39 | 37 |
| 40 bool WebContentsDelegate::ShouldSuppressDialogs() { | 38 bool WebContentsDelegate::ShouldSuppressDialogs() { |
| 41 return false; | 39 return false; |
| 42 } | 40 } |
| 43 | 41 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 WebContents* source, | 107 WebContents* source, |
| 110 const NativeWebKeyboardEvent& event, | 108 const NativeWebKeyboardEvent& event, |
| 111 bool* is_keyboard_shortcut) { | 109 bool* is_keyboard_shortcut) { |
| 112 return false; | 110 return false; |
| 113 } | 111 } |
| 114 | 112 |
| 115 bool WebContentsDelegate::OnGoToEntryOffset(int offset) { | 113 bool WebContentsDelegate::OnGoToEntryOffset(int offset) { |
| 116 return true; | 114 return true; |
| 117 } | 115 } |
| 118 | 116 |
| 119 bool WebContentsDelegate::ShouldAddNavigationToHistory( | |
| 120 const history::HistoryAddPageArgs& add_page_args, | |
| 121 NavigationType navigation_type) { | |
| 122 return true; | |
| 123 } | |
| 124 | |
| 125 gfx::NativeWindow WebContentsDelegate::GetFrameNativeWindow() { | 117 gfx::NativeWindow WebContentsDelegate::GetFrameNativeWindow() { |
| 126 return NULL; | 118 return NULL; |
| 127 } | 119 } |
| 128 | 120 |
| 129 bool WebContentsDelegate::ShouldCreateWebContents( | 121 bool WebContentsDelegate::ShouldCreateWebContents( |
| 130 WebContents* web_contents, | 122 WebContents* web_contents, |
| 131 int route_id, | 123 int route_id, |
| 132 WindowContainerType window_container_type, | 124 WindowContainerType window_container_type, |
| 133 const string16& frame_name, | 125 const string16& frame_name, |
| 134 const GURL& target_url) { | 126 const GURL& target_url) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); | 169 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); |
| 178 attached_contents_.insert(web_contents); | 170 attached_contents_.insert(web_contents); |
| 179 } | 171 } |
| 180 | 172 |
| 181 void WebContentsDelegate::Detach(WebContents* web_contents) { | 173 void WebContentsDelegate::Detach(WebContents* web_contents) { |
| 182 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); | 174 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); |
| 183 attached_contents_.erase(web_contents); | 175 attached_contents_.erase(web_contents); |
| 184 } | 176 } |
| 185 | 177 |
| 186 } // namespace content | 178 } // namespace content |
| OLD | NEW |