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

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

Issue 8051010: Separate Virtual Keyboard related conditionals from TouchUI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased on ToT, fix along with review comments Created 9 years, 2 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) 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/opaque_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 26 matching lines...) Expand all
37 #include "ui/base/theme_provider.h" 37 #include "ui/base/theme_provider.h"
38 #include "ui/gfx/canvas_skia.h" 38 #include "ui/gfx/canvas_skia.h"
39 #include "ui/gfx/font.h" 39 #include "ui/gfx/font.h"
40 #include "ui/gfx/image/image.h" 40 #include "ui/gfx/image/image.h"
41 #include "ui/gfx/path.h" 41 #include "ui/gfx/path.h"
42 #include "views/controls/button/image_button.h" 42 #include "views/controls/button/image_button.h"
43 #include "views/controls/image_view.h" 43 #include "views/controls/image_view.h"
44 #include "views/widget/root_view.h" 44 #include "views/widget/root_view.h"
45 #include "views/window/window_shape.h" 45 #include "views/window/window_shape.h"
46 46
47 #if defined(USE_VIRTUAL_KEYBOARD)
48 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
49 #endif
50
47 #if !defined(OS_WIN) 51 #if !defined(OS_WIN)
48 #include "views/window/hit_test.h" 52 #include "views/window/hit_test.h"
49 #endif 53 #endif
50 54
51 namespace { 55 namespace {
52 // The frame border is only visible in restored mode and is hardcoded to 4 px on 56 // The frame border is only visible in restored mode and is hardcoded to 4 px on
53 // each side regardless of the system window border size. 57 // each side regardless of the system window border size.
54 const int kFrameBorderThickness = 4; 58 const int kFrameBorderThickness = 4;
55 // Besides the frame border, there's another 11 px of empty space atop the 59 // Besides the frame border, there's another 11 px of empty space atop the
56 // window in restored mode, to use to drag the window around. 60 // window in restored mode, to use to drag the window around.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 window_icon_->set_is_light(true); 204 window_icon_->set_is_light(true);
201 AddChildView(window_icon_); 205 AddChildView(window_icon_);
202 window_icon_->Update(); 206 window_icon_->Update();
203 } 207 }
204 208
205 UpdateAvatarInfo(); 209 UpdateAvatarInfo();
206 if (!browser_view_->IsOffTheRecord()) { 210 if (!browser_view_->IsOffTheRecord()) {
207 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, 211 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
208 NotificationService::AllSources()); 212 NotificationService::AllSources());
209 } 213 }
214
215 #if defined(USE_VIRTUAL_KEYBOARD)
216 // Make sure the singleton VirtualKeyboardManager object is initialized.
217 VirtualKeyboardManager::GetInstance();
218 #endif
210 } 219 }
211 220
212 OpaqueBrowserFrameView::~OpaqueBrowserFrameView() { 221 OpaqueBrowserFrameView::~OpaqueBrowserFrameView() {
213 } 222 }
214 223
215 /////////////////////////////////////////////////////////////////////////////// 224 ///////////////////////////////////////////////////////////////////////////////
216 // OpaqueBrowserFrameView, protected: 225 // OpaqueBrowserFrameView, protected:
217 226
218 int OpaqueBrowserFrameView::GetReservedHeight() const { 227 int OpaqueBrowserFrameView::GetReservedHeight() const {
219 return 0; 228 return 0;
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 g_browser_process->profile_manager()->GetProfileInfoCache(); 1170 g_browser_process->profile_manager()->GetProfileInfoCache();
1162 Profile* profile = browser_view_->browser()->profile(); 1171 Profile* profile = browser_view_->browser()->profile();
1163 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath()); 1172 size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath());
1164 if (index != std::string::npos) { 1173 if (index != std::string::npos) {
1165 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index)); 1174 avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index));
1166 avatar_button_->SetText(UTF16ToWideHack( 1175 avatar_button_->SetText(UTF16ToWideHack(
1167 cache.GetNameOfProfileAtIndex(index))); 1176 cache.GetNameOfProfileAtIndex(index)));
1168 } 1177 }
1169 } 1178 }
1170 } 1179 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/touch/frame/touch_browser_frame_view.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698