Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit 0894803

Browse files
committed
Merge pull request #544 from adobe/prashant/cef-upgrade-latest
[CEF 2623] Upgrade to latest CEF
2 parents 016f3f0 + 25a643c commit 0894803

10 files changed

+83
-57
lines changed

Gruntfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = function (grunt) {
6363
/* mac */
6464
"cef-mac": {
6565
"dest" : "<%= downloads %>",
66-
"src" : "<%= cef.url %>/cef_binary_<%= cef.version %>_macosx32.zip"
66+
"src" : "<%= cef.url %>/cef_binary_<%= cef.version %>_macosx64.zip"
6767
},
6868
"cef-mac-symbols": {
6969
"src" : "<%= cef.url %>/cef_binary_<%= cef.version %>_macosx32_release_symbols.zip",
@@ -224,7 +224,7 @@ module.exports = function (grunt) {
224224
},
225225
"cef": {
226226
"url" : "http://s3.amazonaws.com/files.brackets.io/cef",
227-
"version" : "3.2171.1902"
227+
"version" : "3.2623.1397"
228228
},
229229
"node": {
230230
"version" : "0.10.24"

appshell.gyp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
'SDKROOT': '',
3434
'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x',
3535
'COMBINE_HIDPI_IMAGES': 'YES',
36-
'ARCHS': "$(ARCHS_STANDARD_32_BIT)",
36+
'ARCHS': "$(ARCHS_STANDARD_64_BIT)",
3737
'FRAMEWORK_SEARCH_PATHS': [
3838
'$(inherited)',
3939
'$(CONFIGURATION)'
@@ -77,6 +77,7 @@
7777
# Target build path.
7878
'SYMROOT': 'xcodebuild',
7979
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
80+
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
8081
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
8182
},
8283
'conditions': [
@@ -381,6 +382,7 @@
381382
# Target build path.
382383
'SYMROOT': 'xcodebuild',
383384
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
385+
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
384386
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
385387
},
386388
'conditions': [
@@ -472,6 +474,7 @@
472474
'OTHER_LDFLAGS': ['-Wl,-headerpad_max_install_names'],
473475
'SYMROOT': 'xcodebuild',
474476
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
477+
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
475478
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
476479
'FRAMEWORK_SEARCH_PATHS': [
477480
'$(inherited)',

appshell/FullScreenButton.mm

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,7 @@
2323
#import "FullScreenButton.h"
2424

2525
//these are defined in MainMainu.xib file
26-
@implementation FullScreenButton {
27-
NSImage *inactive;
28-
NSImage *active;
29-
NSImage *hover;
30-
NSImage *pressed;
31-
BOOL activeState;
32-
BOOL hoverState;
33-
BOOL pressedState;
34-
}
26+
@implementation FullScreenButton
3527

3628
-(id)initWithCoder:(NSCoder *)aDecoder {
3729
self = [super initWithCoder:aDecoder];

appshell/TrafficLightButton.mm

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,7 @@
2727
static const int MINIMIZE_BUTTON_TAG = 1001;
2828
static const int ZOOM_BUTTON_TAG = 1002;
2929

30-
@implementation TrafficLightButton {
31-
NSImage *inactive;
32-
NSImage *active;
33-
NSImage *hover;
34-
NSImage *pressed;
35-
NSImage *dirtyInactive;
36-
NSImage *dirtyActive;
37-
NSImage *dirtyHover;
38-
NSImage *dirtyPressed;
39-
BOOL activeState;
40-
BOOL hoverState;
41-
BOOL pressedState;
42-
BOOL dirtyState;
43-
BOOL closeButton;
44-
}
30+
@implementation TrafficLightButton
4531

4632
-(id)initWithCoder:(NSCoder *)aDecoder {
4733
self = [super initWithCoder:aDecoder];

appshell/cefclient_mac.mm

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,15 @@ - (void)windowWillEnterFullScreen:(NSNotification *)notification {
334334
}
335335
if (customTitlebar) {
336336
[customTitlebar setHidden:YES];
337+
NSWindow *window = [notification object];
338+
339+
// Since we have nuked the title, we will have
340+
// to set the string back as we are hiding the
341+
// custom title bar.
342+
[window setTitle:[customTitlebar titleString]];
337343
}
338-
344+
345+
339346
if ([self needsFullScreenActivateHack]) {
340347
[NSApp activateIgnoringOtherApps:YES];
341348
[NSApp unhide:nil];
@@ -424,6 +431,11 @@ -(void)windowWillExitFullScreen:(NSNotification *)notification {
424431
// transition from fullscreen back to normal
425432
if (customTitlebar) {
426433
[customTitlebar setHidden:NO];
434+
435+
// Nuke the OS title as the title string is going to
436+
// drawn by customTitleBar.
437+
NSWindow *window = [notification object];
438+
[window setTitle:@""];
427439
}
428440
if (trafficLightsView) {
429441
[trafficLightsView setHidden:NO];
@@ -601,7 +613,7 @@ - (void)createApp:(id)object {
601613
NSClosableWindowMask |
602614
NSMiniaturizableWindowMask |
603615
NSResizableWindowMask |
604-
NSTexturedBackgroundWindowMask );
616+
NSUnifiedTitleAndToolbarWindowMask );
605617

606618
// Get the available screen space
607619
NSRect screen_rect = [[NSScreen mainScreen] visibleFrame];
@@ -650,7 +662,6 @@ - (void)createApp:(id)object {
650662
content_rect = [mainWnd contentRectForFrameRect:[mainWnd frame]];
651663

652664
// Configure the rest of the window
653-
[mainWnd setTitle:WINDOW_TITLE];
654665
[mainWnd setDelegate:self.delegate];
655666
[mainWnd setCollectionBehavior: (1 << 7) /* NSWindowCollectionBehaviorFullScreenPrimary */];
656667

appshell/client_colors_mac.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@
2222
*/
2323

2424
//title bar background
25-
static const float fillComp[4] = {0.23137255f, 0.24705882f, 0.25490196f, 1.0};
25+
26+
#ifndef CLIENT_COLORS
27+
#define CLIENT_COLORS
28+
29+
static CGFloat fillComp[4] = {0.23137255f, 0.24705882f, 0.25490196f, 1.0};
30+
2631
//title text color
27-
static const float activeComp[4] = {0.77254902f, 0.77254902f, 0.77254902f, 1.0};
28-
static const float inactiveComp[4] = {0.50f, 0.50f, 0.50f, 1.0};
32+
static CGFloat activeComp[4] = {0.77254902f, 0.77254902f, 0.77254902f, 1.0};
33+
static CGFloat inactiveComp[4] = {0.50f, 0.50f, 0.50f, 1.0};
34+
35+
#endif
36+

appshell/client_handler.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,16 @@ static void ParseParams(const std::string& params, CefWindowInfo& windowInfo) {
109109
#endif
110110

111111
bool ClientHandler::OnBeforePopup(CefRefPtr<CefBrowser> browser,
112-
CefRefPtr<CefFrame> frame,
113-
const CefString& target_url,
114-
const CefString& target_frame_name,
115-
const CefPopupFeatures& popupFeatures,
116-
CefWindowInfo& windowInfo,
117-
CefRefPtr<CefClient>& client,
118-
CefBrowserSettings& settings,
119-
bool* no_javascript_access) {
112+
CefRefPtr<CefFrame> frame,
113+
const CefString& target_url,
114+
const CefString& target_frame_name,
115+
CefLifeSpanHandler::WindowOpenDisposition target_disposition,
116+
bool user_gesture,
117+
const CefPopupFeatures& popupFeatures,
118+
CefWindowInfo& windowInfo,
119+
CefRefPtr<CefClient>& client,
120+
CefBrowserSettings& settings,
121+
bool* no_javascript_access){
120122
#ifndef OS_LINUX
121123
std::string address = target_url.ToString();
122124
std::string url;

appshell/client_handler.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,17 @@ class ClientHandler : public CefClient,
106106
}
107107

108108
// CefLifeSpanHandler methods
109-
virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser,
110-
CefRefPtr<CefFrame> frame,
111-
const CefString& target_url,
112-
const CefString& target_frame_name,
113-
const CefPopupFeatures& popupFeatures,
114-
CefWindowInfo& windowInfo,
115-
CefRefPtr<CefClient>& client,
116-
CefBrowserSettings& settings,
117-
bool* no_javascript_access) OVERRIDE;
109+
virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser,
110+
CefRefPtr<CefFrame> frame,
111+
const CefString& target_url,
112+
const CefString& target_frame_name,
113+
CefLifeSpanHandler::WindowOpenDisposition target_disposition,
114+
bool user_gesture,
115+
const CefPopupFeatures& popupFeatures,
116+
CefWindowInfo& windowInfo,
117+
CefRefPtr<CefClient>& client,
118+
CefBrowserSettings& settings,
119+
bool* no_javascript_access) OVERRIDE;
118120
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
119121
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
120122

appshell/client_handler_mac.mm

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@
5656
NSWindow* window = [view window];
5757
std::string titleStr(title);
5858
NSString* str = [NSString stringWithUTF8String:titleStr.c_str()];
59-
[window setTitle:str];
60-
59+
6160
NSObject* delegate = [window delegate];
61+
if ([window styleMask] & NSFullScreenWindowMask) {
62+
[window setTitle:str];
63+
}
64+
6265
[delegate performSelectorOnMainThread:@selector(windowTitleDidChange:) withObject:str waitUntilDone:NO];
6366
}
6467

@@ -323,6 +326,13 @@ -(void)windowWillExitFullScreen:(NSNotification *)notification {
323326
// transforms from full screen back to normal
324327
if (customTitlebar) {
325328
[customTitlebar setHidden:NO];
329+
330+
NSWindow *popUpWindow = [notification object];
331+
332+
// Since we have nuked the title, we will have
333+
// to set the string back as we are hiding the
334+
// custom title bar.
335+
[popUpWindow setTitle:@""];
326336
}
327337
if (trafficLightsView) {
328338
[trafficLightsView setHidden:NO];
@@ -352,6 +362,13 @@ - (void)windowWillEnterFullScreen:(NSNotification *)notification {
352362
}
353363
if (customTitlebar) {
354364
[customTitlebar setHidden:YES];
365+
366+
NSWindow *popUpWindow = [notification object];
367+
368+
// Since we have nuked the title, we will have
369+
// to set the string back as we are hiding the
370+
// custom title bar.
371+
[popUpWindow setTitle:[customTitlebar titleString]];
355372
}
356373
if ([self needsFullScreenActivateHack]) {
357374
// HACK to make sure that window is activate
@@ -520,7 +537,7 @@ - (void)windowDidResignKey:(NSNotification *)notification {
520537

521538

522539
// CEF 1750 -- We need to not handle keys for the DevTools Window.
523-
if (browser->GetFocusedFrame()->GetURL() == "chrome-devtools://devtools/devtools.html") {
540+
if (browser->GetFocusedFrame()->GetURL() == "chrome-devtools://devtools/inspector.html") {
524541
return false;
525542
}
526543

appshell_paths.gypi

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@
6969
'include/wrapper/cef_closure_task.h',
7070
'include/wrapper/cef_helpers.h',
7171
'include/wrapper/cef_message_router.h',
72+
'include/wrapper/cef_resource_manager.h',
7273
'include/wrapper/cef_stream_resource_handler.h',
7374
'include/wrapper/cef_xml_object.h',
7475
'include/wrapper/cef_zip_archive.h',
75-
7676
],
7777
'includes_win': [
7878
'include/base/internal/cef_atomicops_x86_msvc.h',
@@ -96,12 +96,15 @@
9696
],
9797
'libcef_sources_common': [
9898
'libcef_dll/cpptoc/cpptoc.h',
99+
'libcef_dll/ctocpp/base_ctocpp.cc',
100+
'libcef_dll/ctocpp/base_ctocpp.h',
99101
'libcef_dll/ctocpp/ctocpp.h',
100102
'libcef_dll/libcef_dll.cc',
101103
'libcef_dll/libcef_dll2.cc',
102104
'libcef_dll/resource.h',
103-
'libcef_dll/transfer_util.cpp',
105+
'libcef_dll/transfer_util.cc',
104106
'libcef_dll/transfer_util.h',
107+
'libcef_dll/wrapper_types.h',
105108
'<@(autogen_library_side)',
106109
],
107110
'libcef_dll_wrapper_sources_common': [
@@ -117,16 +120,18 @@
117120
'libcef_dll/base/cef_thread_checker_impl.cc',
118121
'libcef_dll/base/cef_thread_collision_warner.cc',
119122
'libcef_dll/base/cef_weak_ptr.cc',
123+
'libcef_dll/cpptoc/base_cpptoc.cc',
120124
'libcef_dll/cpptoc/base_cpptoc.h',
121125
'libcef_dll/cpptoc/cpptoc.h',
122-
'libcef_dll/ctocpp/base_ctocpp.h',
123126
'libcef_dll/ctocpp/ctocpp.h',
124-
'libcef_dll/transfer_util.cpp',
127+
'libcef_dll/transfer_util.cc',
125128
'libcef_dll/transfer_util.h',
129+
'libcef_dll/wrapper_types.h',
126130
'libcef_dll/wrapper/cef_browser_info_map.h',
127131
'libcef_dll/wrapper/cef_byte_read_handler.cc',
128132
'libcef_dll/wrapper/cef_closure_task.cc',
129133
'libcef_dll/wrapper/cef_message_router.cc',
134+
'libcef_dll/wrapper/cef_resource_manager.cc',
130135
'libcef_dll/wrapper/cef_stream_resource_handler.cc',
131136
'libcef_dll/wrapper/cef_xml_object.cc',
132137
'libcef_dll/wrapper/cef_zip_archive.cc',

0 commit comments

Comments
 (0)