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

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

Issue 136003015: Remove native_control* and some other non-Aura windows code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove message_loop include Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/views/controls/native_control.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 #if defined(USE_AURA) 142 #if defined(USE_AURA)
143 #include "ui/aura/root_window.h" 143 #include "ui/aura/root_window.h"
144 #include "ui/aura/window.h" 144 #include "ui/aura/window.h"
145 #include "ui/gfx/screen.h" 145 #include "ui/gfx/screen.h"
146 #endif 146 #endif
147 147
148 #if defined(OS_WIN) 148 #if defined(OS_WIN)
149 #include "base/win/windows_version.h" 149 #include "base/win/windows_version.h"
150 #include "chrome/browser/jumplist_win.h" 150 #include "chrome/browser/jumplist_win.h"
151 #include "ui/views/widget/native_widget_win.h"
152 #include "ui/views/win/scoped_fullscreen_visibility.h" 151 #include "ui/views/win/scoped_fullscreen_visibility.h"
153 #include "win8/util/win8_util.h" 152 #include "win8/util/win8_util.h"
154 #endif 153 #endif
155 154
156 #if defined(ENABLE_ONE_CLICK_SIGNIN) 155 #if defined(ENABLE_ONE_CLICK_SIGNIN)
157 #include "chrome/browser/ui/sync/one_click_signin_bubble_delegate.h" 156 #include "chrome/browser/ui/sync/one_click_signin_bubble_delegate.h"
158 #include "chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h" 157 #include "chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h"
159 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h" 158 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h"
160 #endif 159 #endif
161 160
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 return fullscreen_bubble_ != NULL; 960 return fullscreen_bubble_ != NULL;
962 } 961 }
963 962
964 #if defined(OS_WIN) 963 #if defined(OS_WIN)
965 void BrowserView::SetMetroSnapMode(bool enable) { 964 void BrowserView::SetMetroSnapMode(bool enable) {
966 HISTOGRAM_COUNTS("Metro.SnapModeToggle", enable); 965 HISTOGRAM_COUNTS("Metro.SnapModeToggle", enable);
967 ProcessFullscreen(enable, FOR_METRO, GURL(), FEB_TYPE_NONE); 966 ProcessFullscreen(enable, FOR_METRO, GURL(), FEB_TYPE_NONE);
968 } 967 }
969 968
970 bool BrowserView::IsInMetroSnapMode() const { 969 bool BrowserView::IsInMetroSnapMode() const {
971 #if defined(USE_AURA)
972 return false; 970 return false;
973 #else
974 return static_cast<views::NativeWidgetWin*>(
975 frame_->native_widget())->IsInMetroSnapMode();
976 #endif
977 } 971 }
978 #endif // defined(OS_WIN) 972 #endif // defined(OS_WIN)
979 973
980 void BrowserView::RestoreFocus() { 974 void BrowserView::RestoreFocus() {
981 WebContents* selected_web_contents = GetActiveWebContents(); 975 WebContents* selected_web_contents = GetActiveWebContents();
982 if (selected_web_contents) 976 if (selected_web_contents)
983 selected_web_contents->GetView()->RestoreFocus(); 977 selected_web_contents->GetView()->RestoreFocus();
984 } 978 }
985 979
986 void BrowserView::SetWindowSwitcherButton(views::Button* button) { 980 void BrowserView::SetWindowSwitcherButton(views::Button* button) {
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after
2544 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2538 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2545 gfx::Point icon_bottom( 2539 gfx::Point icon_bottom(
2546 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2540 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2547 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2541 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2548 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2542 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2549 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2543 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2550 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2544 top_arrow_height = infobar_top.y() - icon_bottom.y();
2551 } 2545 }
2552 return top_arrow_height; 2546 return top_arrow_height;
2553 } 2547 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/native_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698