| 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 "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 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1926 infobar_container_ = new InfoBarContainerView(this); | 1926 infobar_container_ = new InfoBarContainerView(this); |
| 1927 AddChildView(infobar_container_); | 1927 AddChildView(infobar_container_); |
| 1928 | 1928 |
| 1929 contents_container_ = new views::WebView(browser_->profile()); | 1929 contents_container_ = new views::WebView(browser_->profile()); |
| 1930 contents_container_->set_id(VIEW_ID_TAB_CONTAINER); | 1930 contents_container_->set_id(VIEW_ID_TAB_CONTAINER); |
| 1931 contents_ = new ContentsContainer(contents_container_); | 1931 contents_ = new ContentsContainer(contents_container_); |
| 1932 | 1932 |
| 1933 views::View* omnibox_popup_view_parent = NULL; | 1933 views::View* omnibox_popup_view_parent = NULL; |
| 1934 // SearchViewController doesn't work on windows yet. | 1934 // SearchViewController doesn't work on windows yet. |
| 1935 #if defined(USE_AURA) | 1935 #if defined(USE_AURA) |
| 1936 if (chrome::search::IsInstantExtendedAPIEnabled(browser_->profile())) { | 1936 Profile* profile = browser_->profile(); |
| 1937 search_view_controller_.reset(new SearchViewController(contents_)); | 1937 if (chrome::search::IsInstantExtendedAPIEnabled(profile)) { |
| 1938 search_view_controller_.reset(new SearchViewController(profile, contents_)); |
| 1938 omnibox_popup_view_parent = | 1939 omnibox_popup_view_parent = |
| 1939 search_view_controller_->omnibox_popup_view_parent(); | 1940 search_view_controller_->omnibox_popup_view_parent(); |
| 1940 } | 1941 } |
| 1941 #endif | 1942 #endif |
| 1942 | 1943 |
| 1943 toolbar_ = new ToolbarView(browser_.get()); | 1944 toolbar_ = new ToolbarView(browser_.get()); |
| 1944 AddChildView(toolbar_); | 1945 AddChildView(toolbar_); |
| 1945 toolbar_->Init(this, omnibox_popup_view_parent); | 1946 toolbar_->Init(this, omnibox_popup_view_parent); |
| 1946 | 1947 |
| 1947 #if defined(USE_AURA) | 1948 #if defined(USE_AURA) |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2604 | 2605 |
| 2605 Browser* modal_browser = | 2606 Browser* modal_browser = |
| 2606 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2607 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2607 if (modal_browser && (browser_ != modal_browser)) { | 2608 if (modal_browser && (browser_ != modal_browser)) { |
| 2608 modal_browser->window()->FlashFrame(true); | 2609 modal_browser->window()->FlashFrame(true); |
| 2609 modal_browser->window()->Activate(); | 2610 modal_browser->window()->Activate(); |
| 2610 } | 2611 } |
| 2611 | 2612 |
| 2612 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2613 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2613 } | 2614 } |
| OLD | NEW |