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

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

Issue 6386009: Remove app/win/win_util.h,cc etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with NSApp changes in r73581 Created 9 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 | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 #include "ui/base/resource/resource_bundle.h" 77 #include "ui/base/resource/resource_bundle.h"
78 #include "views/controls/single_split_view.h" 78 #include "views/controls/single_split_view.h"
79 #include "views/focus/external_focus_tracker.h" 79 #include "views/focus/external_focus_tracker.h"
80 #include "views/focus/view_storage.h" 80 #include "views/focus/view_storage.h"
81 #include "views/layout/grid_layout.h" 81 #include "views/layout/grid_layout.h"
82 #include "views/widget/root_view.h" 82 #include "views/widget/root_view.h"
83 #include "views/window/dialog_delegate.h" 83 #include "views/window/dialog_delegate.h"
84 #include "views/window/window.h" 84 #include "views/window/window.h"
85 85
86 #if defined(OS_WIN) 86 #if defined(OS_WIN)
87 #include "app/win/win_util.h"
88 #include "chrome/browser/aeropeek_manager.h" 87 #include "chrome/browser/aeropeek_manager.h"
89 #include "chrome/browser/jumplist_win.h" 88 #include "chrome/browser/jumplist_win.h"
89 #include "ui/base/message_box_win.h"
90 #include "ui/base/view_prop.h" 90 #include "ui/base/view_prop.h"
91 #elif defined(OS_LINUX) 91 #elif defined(OS_LINUX)
92 #include "chrome/browser/ui/views/accelerator_table_gtk.h" 92 #include "chrome/browser/ui/views/accelerator_table_gtk.h"
93 #include "views/window/hit_test.h" 93 #include "views/window/hit_test.h"
94 #include "views/window/window_gtk.h" 94 #include "views/window/window_gtk.h"
95 #endif 95 #endif
96 96
97 #if defined(OS_CHROMEOS) 97 #if defined(OS_CHROMEOS)
98 #include "chrome/browser/ui/views/keyboard_overlay_delegate.h" 98 #include "chrome/browser/ui/views/keyboard_overlay_delegate.h"
99 #endif 99 #endif
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 } 1136 }
1137 1137
1138 void BrowserView::ShowCollectedCookiesDialog(TabContents* tab_contents) { 1138 void BrowserView::ShowCollectedCookiesDialog(TabContents* tab_contents) {
1139 browser::ShowCollectedCookiesDialog(GetNativeHandle(), tab_contents); 1139 browser::ShowCollectedCookiesDialog(GetNativeHandle(), tab_contents);
1140 } 1140 }
1141 1141
1142 void BrowserView::ShowProfileErrorDialog(int message_id) { 1142 void BrowserView::ShowProfileErrorDialog(int message_id) {
1143 #if defined(OS_WIN) 1143 #if defined(OS_WIN)
1144 string16 title = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); 1144 string16 title = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
1145 string16 message = l10n_util::GetStringUTF16(message_id); 1145 string16 message = l10n_util::GetStringUTF16(message_id);
1146 app::win::MessageBox(GetNativeHandle(), message, title, 1146 ui::MessageBox(GetNativeHandle(), message, title,
1147 MB_OK | MB_ICONWARNING | MB_TOPMOST); 1147 MB_OK | MB_ICONWARNING | MB_TOPMOST);
1148 #elif defined(OS_LINUX) 1148 #elif defined(OS_LINUX)
1149 std::string title = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); 1149 std::string title = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME);
1150 std::string message = l10n_util::GetStringUTF8(message_id); 1150 std::string message = l10n_util::GetStringUTF8(message_id);
1151 GtkWidget* dialog = gtk_message_dialog_new(GetNativeHandle(), 1151 GtkWidget* dialog = gtk_message_dialog_new(GetNativeHandle(),
1152 static_cast<GtkDialogFlags>(0), GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, 1152 static_cast<GtkDialogFlags>(0), GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
1153 "%s", message.c_str()); 1153 "%s", message.c_str());
1154 gtk_window_set_title(GTK_WINDOW(dialog), title.c_str()); 1154 gtk_window_set_title(GTK_WINDOW(dialog), title.c_str());
1155 g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); 1155 g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
1156 gtk_widget_show_all(dialog); 1156 gtk_widget_show_all(dialog);
1157 #else 1157 #else
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 preview_container_->ChangeTabContents(NULL); 1391 preview_container_->ChangeTabContents(NULL);
1392 contents_->SetPreview(NULL, NULL); 1392 contents_->SetPreview(NULL, NULL);
1393 delete preview_container_; 1393 delete preview_container_;
1394 preview_container_ = NULL; 1394 preview_container_ = NULL;
1395 } 1395 }
1396 1396
1397 gfx::Rect BrowserView::GetInstantBounds() { 1397 gfx::Rect BrowserView::GetInstantBounds() {
1398 return contents_->GetPreviewBounds(); 1398 return contents_->GetPreviewBounds();
1399 } 1399 }
1400 1400
1401 gfx::Rect BrowserView::GrabWindowSnapshot(std::vector<unsigned char>*
1402 png_representation) {
1403 views::Window* window = GetWindow();
1404
1405 #if defined(USE_X11)
1406 ui::GrabWindowSnapshot(window->GetNativeWindow(), png_representation);
1407 #elif defined(OS_WIN)
1408 app::win::GrabWindowSnapshot(window->GetNativeWindow(), png_representation);
1409 #endif
1410
1411 return window->GetBounds();
1412 }
1413
1414 #if defined(OS_CHROMEOS) 1401 #if defined(OS_CHROMEOS)
1415 void BrowserView::ShowKeyboardOverlay(gfx::NativeWindow owning_window) { 1402 void BrowserView::ShowKeyboardOverlay(gfx::NativeWindow owning_window) {
1416 KeyboardOverlayDelegate::ShowDialog(owning_window); 1403 KeyboardOverlayDelegate::ShowDialog(owning_window);
1417 } 1404 }
1418 #endif 1405 #endif
1419 1406
1420 /////////////////////////////////////////////////////////////////////////////// 1407 ///////////////////////////////////////////////////////////////////////////////
1421 // BrowserView, BrowserWindowTesting implementation: 1408 // BrowserView, BrowserWindowTesting implementation:
1422 1409
1423 BookmarkBarView* BrowserView::GetBookmarkBarView() const { 1410 BookmarkBarView* BrowserView::GetBookmarkBarView() const {
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2552 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2566 2553
2567 return view; 2554 return view;
2568 } 2555 }
2569 #endif 2556 #endif
2570 2557
2571 // static 2558 // static
2572 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2559 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2573 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2560 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2574 } 2561 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698