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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 10787028: Converts SearchViewController to use live NTP content instead of placeholder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Layout hack Created 8 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 | « no previous file | chrome/browser/ui/views/search_view_controller.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 // 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 "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 AddChildView(infobar_container_); 1931 AddChildView(infobar_container_);
1932 1932
1933 contents_container_ = new views::WebView(browser_->profile()); 1933 contents_container_ = new views::WebView(browser_->profile());
1934 contents_container_->set_id(VIEW_ID_TAB_CONTAINER); 1934 contents_container_->set_id(VIEW_ID_TAB_CONTAINER);
1935 contents_ = new ContentsContainer(contents_container_); 1935 contents_ = new ContentsContainer(contents_container_);
1936 1936
1937 views::View* omnibox_popup_view_parent = NULL; 1937 views::View* omnibox_popup_view_parent = NULL;
1938 // SearchViewController doesn't work on windows yet. 1938 // SearchViewController doesn't work on windows yet.
1939 #if defined(USE_AURA) 1939 #if defined(USE_AURA)
1940 if (chrome::search::IsInstantExtendedAPIEnabled(browser_->profile())) { 1940 if (chrome::search::IsInstantExtendedAPIEnabled(browser_->profile())) {
1941 search_view_controller_.reset(new SearchViewController(contents_)); 1941 search_view_controller_.reset(
1942 new SearchViewController(browser_->profile(), contents_));
1942 omnibox_popup_view_parent = 1943 omnibox_popup_view_parent =
1943 search_view_controller_->omnibox_popup_view_parent(); 1944 search_view_controller_->omnibox_popup_view_parent();
1944 } 1945 }
1945 #endif 1946 #endif
1946 1947
1947 toolbar_ = new ToolbarView(browser_.get()); 1948 toolbar_ = new ToolbarView(browser_.get());
1948 AddChildView(toolbar_); 1949 AddChildView(toolbar_);
1949 toolbar_->Init(this, omnibox_popup_view_parent); 1950 toolbar_->Init(this, omnibox_popup_view_parent);
1950 1951
1951 #if defined(USE_AURA) 1952 #if defined(USE_AURA)
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
2583 if (contents && contents->GetContentNativeView() && 2584 if (contents && contents->GetContentNativeView() &&
2584 contents->GetContentNativeView()->HasFocus()) { 2585 contents->GetContentNativeView()->HasFocus()) {
2585 (contents->GetRenderViewHost()->*method)(); 2586 (contents->GetRenderViewHost()->*method)();
2586 return true; 2587 return true;
2587 } 2588 }
2588 #elif defined(OS_WIN) 2589 #elif defined(OS_WIN)
2589 // TODO(yusukes): Support non-Aura Windows. 2590 // TODO(yusukes): Support non-Aura Windows.
2590 #endif 2591 #endif
2591 return false; 2592 return false;
2592 } 2593 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/search_view_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698