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

Side by Side Diff: content/public/browser/web_contents_delegate.cc

Issue 11824050: InstantExtended: Committed NTP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use WebContentsDelegate for focusing omnibox by default. Created 7 years, 10 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
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 const string16& source_id) { 48 const string16& source_id) {
49 return false; 49 return false;
50 } 50 }
51 51
52 void WebContentsDelegate::BeforeUnloadFired(WebContents* web_contents, 52 void WebContentsDelegate::BeforeUnloadFired(WebContents* web_contents,
53 bool proceed, 53 bool proceed,
54 bool* proceed_to_fire_unload) { 54 bool* proceed_to_fire_unload) {
55 *proceed_to_fire_unload = true; 55 *proceed_to_fire_unload = true;
56 } 56 }
57 57
58 bool WebContentsDelegate::ShouldFocusLocationBarByDefault(WebContents* source) {
59 return false;
60 }
61
58 bool WebContentsDelegate::ShouldFocusPageAfterCrash() { 62 bool WebContentsDelegate::ShouldFocusPageAfterCrash() {
59 return true; 63 return true;
60 } 64 }
61 65
62 bool WebContentsDelegate::TakeFocus(WebContents* soruce, bool reverse) { 66 bool WebContentsDelegate::TakeFocus(WebContents* soruce, bool reverse) {
63 return false; 67 return false;
64 } 68 }
65 69
66 int WebContentsDelegate::GetExtraRenderViewHeight() const { 70 int WebContentsDelegate::GetExtraRenderViewHeight() const {
67 return 0; 71 return 0;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); 169 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end());
166 attached_contents_.insert(web_contents); 170 attached_contents_.insert(web_contents);
167 } 171 }
168 172
169 void WebContentsDelegate::Detach(WebContents* web_contents) { 173 void WebContentsDelegate::Detach(WebContents* web_contents) {
170 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); 174 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end());
171 attached_contents_.erase(web_contents); 175 attached_contents_.erase(web_contents);
172 } 176 }
173 177
174 } // namespace content 178 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698